老問題,新答案
問題:
- fatal: unable to access 'https://xxx@github.com/xxx/xxx.git/': The requested URL returned error: 403
- OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
有Proxy的時候,會出現這個錯誤,網絡上說:
git config --global --unset http.proxy
git config --global http.sslVerify false
我網絡不行,我為啥要unset proxy?
ssl是HTTPS協議的內容,為啥不讓校驗?
目前我發現:
是因為本地倉庫沒有設置origin remote。
解決方案
- 檢查
.gitconfig
,是否有無效的Http.proxy
,https.proxy
。 - 檢查
git remote -v
是否添加了https的origin項目地址。 git remote add origin https://github.com/slankka/xxxx.git
提示
- 該走通道的走通道,根本沒問題。
- 別改
git@github.com
這種協議,麻煩,還要走ssh協議,費勁。 - 別改
https://username:password@github.com/
,何必暴露自己密碼呢,或者配置AccessToken不麻煩?
正確操作就是什么也別改,去檢查憑據管理器
認證失敗
- 如果密碼更換過,去Windows憑據管理器,更新https協議的git密碼。
- 再就是
git config --unset credential.helper
或者git config --system --unset credential.helper