17 lines
298 B
Markdown
17 lines
298 B
Markdown
go get只支持https,若只有http或ssh,需要配置
|
|
|
|
#### ssh
|
|
```bash
|
|
# ssh
|
|
# 在.gitconfig文件中替换
|
|
[url "ssh://git.xxx.com:2222"]
|
|
insteadOf https://git.xxx.com/
|
|
```
|
|
#### http
|
|
```bash
|
|
go env -w GOINSECURE=git.xxx.com
|
|
```
|
|
#### 配置私库
|
|
```bash
|
|
go env -w GOPRIVATE=git.xhupo.com
|
|
```
|