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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章