问题
无法安装gin框架, 一直不动
运行命令: go get -u github.com/gin-gonic/gin
看目标是下载github.com/gin-gonic/gin单纯的以为是从github下载。实际上是无法访问golang.org导致。
使用代理即解决问题:
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct
可参看:
Golang 1.13: 解决国内 go get 无法下载的问题
https://www.sunzhongwei.com/problem-of-domestic-go-get-unable-to-download?from=sidebar_new
在错误的思路上验证为什么无法从github拉取代码时
使用ssh -T git.github.com
PTY allocation request failed on channel 0
Hi xxx! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
ssh -Tv git.github.com 可看更多细节
but GitHub does not provide shell access.不是什么重要信息,不影响拉取代码,可以忽略!