失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > 解决 Push failed: Unable to access 'https://github.com/...': Failed to connect ...Connection Refused

解决 Push failed: Unable to access 'https://github.com/...': Failed to connect ...Connection Refused

时间:2022-07-26 01:46:13

相关推荐

解决 Push failed: Unable to access 'https://github.com/...': Failed to connect ...Connection Refused

解决 Push failed: Unable to access ‘/…’: Failed to connect to 127.0.0.1 port xxx Connection Refused

问题

Android studio 下连接到github,share project的时候已经成功建立repo,但是push的时候总会出现如上错误。

跳过的坑

百度了很多方法,绝大多数都是以下两种答案,终归都是说因为代理问题

有说需要取消代理,但想想自己也没有做过任何代理

env|grep -I proxy也没有列出任何proxy,所以此方案无效。还有说需要修改 gradle.properties, 但找了半天也没有找到任何和代理相关的东西,C/User/.gradle里也找不到有些文章所说的 gradle.properties,所以此方案无效。

最终解决方法

终归还是代理问题。。。

Windows 全局搜索.gitconfig,删除有关proxy的所有行,其他的不用管,再次用Android Studio 里的push以后就可以了。

当看到Push successful: Pushed master to new branch origin/master。。。 又填平一个坑

如果觉得《解决 Push failed: Unable to access 'https://github.com/...': Failed to connect ...Connection Refused》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。