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]
- 解决 git pull/push 每次都要输入用户名密码的问题
输入用户名、密码后执行
git config --global credential.helper store
5.git修改远程仓库地址
(1)
git remote set-url origin [url]
(2)
git remote rm origin
git remote add origin [url]