各种环境异常问题汇总
汇总 SSH 私钥权限过宽、ssh-agent 未启动、当前目录不是 git 仓库、GitHub 安全告警等常见报错的原因和修复命令,遇到卡住先来对照。
WARNING: UNPROTECTED PRIVATE KEY FILE!
Permissions 0755 for ‘/root/.ssh/id_rsa’ are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
[!TIP] 给文件权限设置为600
chmod 600 ~/.ssh/id_rsa·····
Could not open a connection to your authentication agent 在执行 ssh-add ~/.ssh/id_ras 时发生此错
[!TIP] 执行
ssh-agent bash后重新尝试 ····· fatal: not a git repository (or any of the parent directories): .git 没有git存储库 [!TIP] 执行git init创建存储库 ····· warning: ·······················— SECURITY WARNING ·························- warning: | TLS certificate verification has been disabled! | warning: ··························································· warning: HTTPS connections may not be secure. See https://aka.ms/gcmcore-tlsverify for more information. [!TIP] 执行git config --global http.sslVerify true····· warning: could not find UI helper ‘Github.UI’ or ‘Gitlab.UI’ [!TIP] 控制面板\用户帐户\凭据管理器,添加普通凭证,输入对应网址,填写账号密码
git xxx is not a git command. See ‘git —help’.
[!TIP] git后添加clone命令
git clone xxx@xx.giterror: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1) [!TIP] 更改HTTP协议
HTTP/2:git config --global http.version HTTP/2
HTTP/1.1git config --global http.version HTTP/1.1error: RPC failed; curl 55 OpenSSL SSL_write: SSL_ERROR_ZERO_RETURN, errno 10053 error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502 Proxy Error fatal [!TIP]git config http.postBuffer 524288000
需要全局设置在config后加–global
error setting certificate verify locations
[!TIP] 1.关闭证书校验:
git config --system http.sslverify false
2.重新设置git配置文件路径:git config --system http.sslcainfo "路径地址"fatal: unable to access ‘https://gitlab.com/…/…git/’: Recv failure: Connection was reset [!TIP] ‘git config —global —unset http.proxy /br git config —global —unset https.proxy’

评论