美文网首页
git设置代理后push代码异常

git设置代理后push代码异常

作者: 无拘无束的猪 | 来源:发表于2020-08-31 17:30 被阅读0次

方法1还原代理

// 查看当前代理设置
git config --global http.proxy
git config --global https.proxy
 
// 设置当前代理为 http://127.0.0.1:1080 或 socks5://127.0.0.1:1080
git config --global http.proxy 'http://127.0.0.1:1080'
git config --global https.proxy 'http://127.0.0.1:1080'
 
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
 
// 删除 proxy
git config --global --unset http.proxy

方法2设置协议

一般是github-desktop下载的代码多数是https协议,可以选择git协议
配置了本地的 socks5 的代理(Shadowsocks 之类的代理软件)
配置了远程服务器 Git 服务端的 SSH
本地提交代码到远程服务器时使用的是 http/https 协议

如果还不能解决的话:
<git@github.com:cracker8090/cracker8090.github.io.git>
采用git协议clone代码。

相关文章

  • git设置代理后push代码异常

    方法1还原代理 方法2设置协议 一般是github-desktop下载的代码多数是https协议,可以选择git协...

  • idea、gitbash使用http代理设置

    idea设置http代理后,可以登录github但无法clone代码。 需要在Git bash中也设置代理 设置代...

  • git push 报错:Failed to connect to

    git push提交代码的时候突然报错: 解决办法:1、查代理 git config --global http....

  • git push到远端后,如何撤回push

    git push后,发现问题,需要撤回代码,可通过reset到指定commit,再push,完成回退,并且git ...

  • git常用的一些操作指令

    git操作总结 1. 设置git的本地配置信息 2. push修改的文件说明:refs/for/提交代码到...

  • 代理设置

    终端代理设置 wget设置代理 curl 设置代理 git 设置代理 ssh 代理 nc命令 网络工具 digns...

  • git ssh代理设置

    终端代理设置 wget设置代理 curl 设置代理 git 设置代理 ssh 代理 nc命令 网络工具dignsl...

  • git设置及取消代理

    git设置及取消代理//首先,设置默认代理,也可以理解为清除代理 //设置代理

  • git 命令

    git pullgit add -Agit commit - "代码说明"git push 本地代码commit过...

  • git ssh key 设置

    git ssh key 设置 设置完成后,git pull,push等命令就不需要再输入用户名和密码了 生成公钥,...

网友评论

      本文标题:git设置代理后push代码异常

      本文链接:https://www.haomeiwen.com/subject/taqpsktx.html