Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

私有仓库配置

将gitee.com 设置为私有仓库

  1. 首先配置https请求转换为ssh:
git config --global url."git@gitee.com:".insteadOf "https://gitee.com/"

 git config --global http.extraheader "PRIVATE-TOKEN: B9TWLqsLdh1-513os1Pm"

git config --global url."git@192.168.200.47".insteadOf "http://192.168.200.47:8083/"
git config --global url."git@192.168.200.47".insteadOf "http://git.zhongzhuoxin.com:9000/"
  1. 配置环境变量 go env -w GOPRIVATE=gitee.com

  2. 新建的仓库名字一定要改成和仓库地址一致

  • 新建仓库 gitee.com/zouni88/util
  • 项目目录下 go.mod 修改modulegitee.com/zouni88/util