git - 升级后 Ubuntu 无法找到 Git 存储库

标签 git ubuntu ssh

在我将 Ubuntu 从 14.04 升级到 14.10(现在升级到 15.04)后,我失去了使用 git 协议(protocol)连接到 GitHub 和 Bitbucket 的能力,https 和 ssh 工作正常:
ssh -T git@github.com Hi Arbolista! You've successfully authenticated, but GitHub does not provide shell access.
惊人的。
git remote add github git@github.com:arbolista/my_repo.git git remote -v github https://github.arbolista/my_repo.git (fetch) github https://github.arbolista/my_repo.git (push) git pull github master fatal: repository 'https://github.arbolista/my_repo.git/' not found
不是那么棒,让我发疯。我重新安装了 git(现在是最新的 2.5.2)和我的 ssh key 无济于事 - 我完全迷失了这一点。

我还确保 git 端口没有防火墙:
sudo ufw status verbose Status: inactive
我的 ~/.ssh/config 看起来像这样(从它工作时不变):
Host github.com-arbolista HostName github.com User git IdentityFile ~/.ssh/id_rsa

最佳答案

打开.git/config .应该有一个名为 [remote "github"] 的部分与 url=https://github.arbolista/my_repo.git
更改urlgit@github.com:arbolista/my_repo.git

关于git - 升级后 Ubuntu 无法找到 Git 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32568325/

相关文章:

ubuntu - 在 Ubuntu 上安装 rpy2

c++ - 在 Ubuntu 中使用 OpenSSL 的链接问题

git - 如何为 Bitbucket 项目使用 SSH key ?

git - 如何将 aptana 连接到本地 GIT 存储库

当我知道主分支和 tfs/default 发生更改时,git tfs checkin 工具显示 'nothing to commit'

git - 尽管文件内容没有改变,但 git clone 后 zip 文件的 Sha256 哈希值不同?

git拒绝在没有代理的情况下连接

vim - Ubuntu、Vim 和曝光调色板

mysql - Ruby on Rails - 在 SSH 隧道查询后连接回应用程序数据库

linux - 使用 git-shell 的自定义命令