go get不能安装github包的解决办法


问题:

fatal: unable to access 'https://github.com/chenqionghe/amount-calculator/': Failed to connect to github.com port 443: Operation timed out

原因很明显,是因为go get是基于git的方式获取仓库的,然后默认用的是https的,被拒绝了,我们需要换成ssh的

解决

命令行替换

 git config --global url.git@github.com:.insteadOf https://github.com/


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM