所以基本上,我有一个 Openshift 项目,它在 Git 推送时使用“Go get”下载所有库并即时构建项目,因此,我有一些我不希望人们从我的代码中看到的代码自己的库,为了正确编译,代码需要从 github.com 或其他 repo 中获取,所以我创建了一个私有(private) bitbucket.org repo,现在,作为公共(public) repo 它工作正常,但是当我尝试'从我的私有(private)仓库中获取”,它给了我“禁止 403”
如何避免这种情况发生? 感谢您的阅读,祝您有美好的一天!
最佳答案
go get
在内部使用 git
。下面的一个衬线将使 git
并因此 go get
通过 SSH 克隆你的包。
Github:
git config --global url."git@github.com:".insteadOf "https://github.com/"
比特桶:
git config --global url."git@bitbucket.org:".insteadOf "https://bitbucket.org/"
关于git - 来自 Bitbucket 的“Go Get”私有(private) repo ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38668444/