代理访问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

 

posted @ 2021-04-01 10:47  Ace001  阅读(289)  评论(0编辑  收藏  举报