【发布时间】:2015-09-14 23:23:24
【问题描述】:
在我将 Ubuntu 从 14.04 升级到 14.10(现在升级到 15.04)后,我无法使用 git 协议连接到 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 密钥无济于事 - 我完全迷失了这一点。
我还确保 git 端口没有防火墙:
sudo ufw status verbose
Status: inactive
我的 ~/.ssh/config 看起来像这样(从它工作时不变):
Host github.com-arbolista
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa
【问题讨论】:
-
从输出中可以明显看出,实际上是 https 访问失败。