隨着在github私人回購協議,我可以生成一個「個人訪問令牌」和進入私人到位桶原始內容通過OAuth
curl https://<oauth-secret>:[email protected]/<me>/<repo>/master/<file>
,並得到該文件的內容。 bitbucket可能是同一件事情嗎?
隨着在github私人回購協議,我可以生成一個「個人訪問令牌」和進入私人到位桶原始內容通過OAuth
curl https://<oauth-secret>:[email protected]/<me>/<repo>/master/<file>
,並得到該文件的內容。 bitbucket可能是同一件事情嗎?
哦,嘿,事實證明,你可以只使用http(s)身份驗證。
curl --user <username>:<password> https://bitbucket.org/<username>/<repo>/raw/<file>
這有點具有比令牌(您可以限制權限)的腳本用戶名和密碼,一個更大的安全漏洞,但它能夠在這種情況下所做的工作。
根據OAuth on Bitbucket Cloud,您需要編寫https://x-token-auth:{access_token}@bitbucket.org
,以便您將令牌用作密碼而不是用戶名。
使用OAuth token和Bitbucket api與PARAM的access_token:
https://api.bitbucket.org/2.0/repositories/{username}/{repo_slug}/src/master/{file}?access_token={access_token}