git相关问题

1.git pull时报错 fatal: unable to access ‘https://github.com/…/.git’: Could not resolve host: github.com
执行以下命令

git config --global --unset http.proxy 
git config --global --unset https.proxy

2.git push时报错error: failed to push some refs to ‘git@xxx’
服务器该目录下 .git/没有权限
执行 chmod -R 777 .git/
3. GitHub下载clone指定分支tag代码

git clone -b [tag] [https://github.com/xxx.git]
  1. 解决 git pull/push 每次都要输入用户名密码的问题
    输入用户名、密码后执行
git config --global credential.helper store
发布了41 篇原创文章 · 获赞 0 · 访问量 5622

猜你喜欢

转载自blog.csdn.net/m0_37515193/article/details/104811268