Git push的常见问题

解决方法一

检查是否进行的Git设置

git config --global user.name "YOUR NAME"
git config --global user.email "YOUR EMAIL ADDRESS"

方法二
确保用户名正确的情况还是报错,就把HTTPS改为SSH方式连接,例如:

git remote set-url origin "YOUR SSH CONNECT ADDRESS"
  • fatal: Could not read from remote repository.
    Please make sure you have the correct access rights
    and the repository exists.

解决方法
因为使用 SSH 连接,安全问题,要把Github添加到信任列表里。

ssh -T git@github.com

返回这个信息就表示成功了

Hi username! You've successfully authenticated, but GitHub does not
# provide shell access.

附上github文档

猜你喜欢

转载自blog.csdn.net/lin74love/article/details/78279169