我們正在使用私有 Bitbucket 存儲庫來管理我們的 Go 庫。通過使用這個Stackoverflow 答案中描述的insteadOf配置,我們有一個工作構(gòu)建到 Go 版本 1.12。版本 1.13 和 1.14 不再工作。我們看到這樣的錯誤:git$ go vet ./...go: downloading bitbucket.org/travelloapp/golibs v1.0.42usercache/usercache.go:6:2: bitbucket.org/travelloapp/golibs@v1.0.42: verifying module: bitbucket.org/travelloapp/golibs@v1.0.42: reading https://sum.golang.org/lookup/bitbucket.org/travelloapp/golibs@v1.0.42: 410 Gone server response: not found: bitbucket.org/travelloapp/golibs@v1.0.42: reading https://api.bitbucket.org/2.0/repositories/travelloapp/golibs?fields=scm: 403 Forbidden server response: Access denied. You must have write or admin access.Go FAQ 建議設(shè)置' curls~/.netrc文件。我已經(jīng)做到了,使用 Bitbucket 的“應用程序密碼”功能。它不會改變結(jié)果。我已經(jīng)添加了bitbucket.org和api.bitbucket.org作為主機名。我可以直接測試文件設(shè)置是否正確curl:$ curl -n https://api.bitbucket.org/2.0/repositories/travelloapp/golibs?fields=scm{"scm": "git"}記錄在案:盡管有 Bitbucket 錯誤消息。存儲庫讀取權(quán)限似乎是唯一需要的權(quán)限,盡管我也嘗試過啟用所有權(quán)限。我錯過了什么嗎?為什么適用于 Go 1.12 的方法不再適用于更高版本?我目前正在使用:$ go versiongo version go1.14.2 linux/amd64$ git versiongit version 2.17.1$ curl --versioncurl 7.58.0 (x86_64-pc-linux-gnu) libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3Release-Date: 2018-01-24Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL我們在 Go 1.13 發(fā)布時首先遇到了這個問題,目前我們?nèi)匀粚⑺协h(huán)境都保留在 1.12 上。
- 1 回答
- 0 關(guān)注
- 112 瀏覽
添加回答
舉報
0/150
提交
取消