Skip to main content

常见错误

1. 无法读取远程仓库

ubuntu@ubuntu-dev:~/gs$ git pull
remote:
remote: ========================================================================
remote:
remote: The project you were looking for could not be found.
remote:
remote: ========================================================================
remote:
fatal: 无法读取远程仓库。

解决办法

git remote -v 查看

origin  git@172.23.0.8:s1/gs.git (fetch)
origin git@172.23.0.8:s1/gs.git (push)

如果是git的就是用秘钥,需要在配置里面把生成的秘钥配置进去

vim ~/.ssh/config

Host 172.23.0.8
HostName 172.23.0.8
User git
IdentityFile ~/.ssh/id_ed25519