怎样下载建设部网站,商城网站后台模板,高端手机网站,wordpress主题压缩包安装提示无效git push无法连接443端口 **问题1****方法一#xff1a;取消代理设置**git命令 其他解决方案1. **设置 Git 使用 HTTP 而不是 HTTPS**2. **检查证书**3. **配置 Git 忽略 SSL 验证#xff08;不推荐#xff09;**4. **检查代理设置** 问题1 Failed to connect to github.com… git push无法连接443端口 **问题1****方法一取消代理设置**git命令 其他解决方案1. **设置 Git 使用 HTTP 而不是 HTTPS**2. **检查证书**3. **配置 Git 忽略 SSL 验证不推荐**4. **检查代理设置** 问题1 Failed to connect to github.com port 443 after 21075 ms: Connection refused连接超时使用代理 关于代理
方法一取消代理设置
查看配置
git config --global -l 如果并未使用VPN但依然遇到端口443连接失败的问题尝试取消Git的代理设置
git config --global --unset http.proxy
git config --global --unset https.proxygit命令
启用命令
git config --global http.proxy 127.0.0.1:7890
git config --global https.proxy 127.0.0.1:7890其他命令
设置全局 Git 用户名和邮箱 若是第一次使用 git 的话请先配置全局的用户名和邮箱将以下命令用户名邮箱替换。
git config --global user.name Your Name
git config --global user.email youremailyourdomain.com配置完成后可以通过以下命令确认这些信息
git config --list
user.nameYour Name
user.emailyouremailyourdomain.comctrlf1f5
其他解决方案
1. 设置 Git 使用 HTTP 而不是 HTTPS
如果问题仍然存在你可以临时将 Git 配置为使用 HTTP 而不是 HTTPS
git remote set-url origin http://github.com/LYL1129/webserver.git然后尝试再次推送
git push -u origin main请注意使用 HTTP 连接会降低安全性建议只作为临时解决方案。
2. 检查证书
确保你的系统信任 GitHub 的 SSL 证书。你可以尝试重新安装根证书
sudo apt install --reinstall ca-certificates3. 配置 Git 忽略 SSL 验证不推荐
作为最后的手段你可以配置 Git 忽略 SSL 证书验证但这会降低安全性
git config --global http.sslVerify false请在问题解决后立即将 SSL 验证重新启用
git config --global http.sslVerify true4. 检查代理设置
如果你通过代理访问互联网确保你的代理设置正确。可以配置 Git 使用代理
git config --global http.proxy http://proxyuser:proxypasswordproxy.server.com:port总结
启动代理http代理关掉ssl证书验证