论go get bitbucket.org/../..的执行
我知道这个错误
yash.jain projectname % go get bitbucket.org/../..
go: bitbucket.org/../..
https://api.bitbucket.org/2.0/repositories/../..?fields=scm: 403 Forbidden
go: error loading module requirements我试过什么
尽管如此,我还是会犯同样的错误。如果我做错了什么请告诉我。
发布于 2021-05-31 09:15:26
这些都是我努力让它发挥作用的步骤。
ssh进行连接。GOPRIVATE=bitbucket.org/<orgname>/**允许组织的所有回购。
在这两个步骤之后,我就可以导入包了。
注: Sourcetree仅适用于Mac和Windows。
使用Commnd Line: For Linux/Mac/Windows:
git config --global url."git@bitbucket.org:".insteadOf "https://bitbucket.org/"GOPRIVATE=bitbucket.org/<orgname>/*即使在上面的配置之后,更新也可能会收到404错误。
Error
reading https://api.bitbucket.org/2.0/repositories/xyz/privaterepo?fields=scm: 404 Not FoundBitbucket最近更新了他们针对私有存储库的API,由于这些API,某些golang版本中断了。
无法访问私有存储库的用户将接收404 (未找到)响应代码,而不是403 (禁止的)响应代码,以掩盖在给定URL路径上私有存储库的存在。 推出这些更改将打破先前版本的Go,因为go命令依赖403响应来获取托管在Bitbucket Cloud上的存储库。 要确保不会遇到任何问题,请将GoLang更新为最新版本。
这将于2022年6月1日生效。
发布于 2021-05-31 04:21:09
我通常有两种方法来解决这个问题。但是,为此,您需要使用SSH配置bitbucket。
1.编辑git.config
编辑全局.gitconfig
nano /home/user/.gitconfig
添加以下行
[url "git@bitbucket.org:"] insteadOf = https://bitbucket.org/2.出口商品
export GOPRIVATE=bitbucket.org/<your repo>发布于 2021-05-29 06:02:26
首先检查ssh -Tv git@bitbucket.org返回的内容,特别是欢迎消息中提到的用户:它可能是一个帐户,它没有访问私有存储库的权限。
正如"什么是“去获取”私有存储库的正确方法?“中所提到的,也尝试使用不受密码保护的私有ssh密钥,以确保在go get进程的中间没有提示指定密码。
https://stackoverflow.com/questions/63791976
复制相似问题