代理访问github vs无法推送到仓库:Attempting push on git and receiving “could not read Username for 'https://github.com': terminal prompts disabled”

解决:

1.找到git的config文件,追加以下内容

[http]
proxy=socks://代理ip:端口/
sslVerify = false

[https]
proxy=socks://代理ip:端口/
sslVerify = false

2.修改gitconfig里push地址,地址里包含用户名和密码(如果密码里有特殊符号需转义例如?替换为%3F)

pushurl = https://用户名:密码@github.com/用户名/项目名.git

作者:xuejianxiyang
出处:http://xuejianxiyang.cnblogs.com
关于作者:Heaven helps those who help themselves.
本文版权归原作者和博客园共有,欢迎转载,但未经原作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

原文地址:https://www.cnblogs.com/xuejianxiyang/p/14605266.html