2 回答

TA貢獻1773條經(jīng)驗 獲得超3個贊
您的客戶端被重定向到返回 a StatusCode
of的登錄頁面200
。
第一個命中被重定向(302
with Location: /account/signin/?next=/md-shabbir/test-repo/get/master.tar.gz
),第二個命中也被重定向( 302 Found
with Location: https://bitbucket.org/socialauth/login/atlassianid/?next=%2Fmd-shabbir%2Ftest-repo%2Fget%2Fmaster.tar.gz
)。
此登錄頁面返回200
您看到的狀態(tài)碼。
如果您不希望您的客戶遵循這些重定向,您可以從CheckRedirect
.
我不確定這是否真的能解決問題(因為在 BitBucket 中可能仍然返回302
),但您也不能繼續(xù)重定向到此 URL 并將它們視為錯誤。

TA貢獻1833條經(jīng)驗 獲得超4個贊
If using https in Golange enable ssl , Try this below code like.
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
_, err := http.Get("https://bitbucket.org/md-shabbir/test-repo/get/master.tar.gz")
if err != nil {
fmt.Println(err)
}
- 2 回答
- 0 關注
- 178 瀏覽
添加回答
舉報