如何使用令牌来操作Bitbucket存储库? [英] How to manipulate Bitbucket repository with token?
问题描述
我遵循这个文档从bitbucket获取一个令牌值和一个令牌密钥:
https://confluence.atlassian.com/display/BITBUCKET/OAuth+on+Bitbucket
之后,我想通过使用该标记推/拉给定的回购。
在Github上,我可以像这样使用标记:
https://help.github.com/articles/git-automation -with-oauth-tokens#step-2-clone-a-repository
我的问题是如何在bitbucket中使用这种类型的http授权mercurial / git)?
BitBucket页面提及:
$ b
请参阅 Bitbucket Cloud上的OAuth ,建议 > nick graziano 。
I followed this documentation to get a token value and a token secret from bitbucket:
https://confluence.atlassian.com/display/BITBUCKET/OAuth+on+Bitbucket
After that I want to push/pull to a given repo by using that token.
At Github I can use the token like this way: https://help.github.com/articles/git-automation-with-oauth-tokens#step-2-clone-a-repository
My question is how can I use this kind of http authorization at bitbucket (mercurial/git)?
This BitBucket page mentions:
We recently introduced OAuth 2 and also added the ability to use them as HTTP Basic Auth credentials.
Cloning a repository with an access token
Since add-ons will not be able to upload their own SSH keys to clone with, access tokens can be used as Basic HTTP Auth credentials to clone securely over HTTPS.
git clone https://x-token-auth:{access_token}@bitbucket.org/user/repo.git
The literal string
x-token-auth
as a substitute for username is required.Our process is similar to GitHub, yet slightly different: the difference is GitHub puts the actual token in the username field.
See more at "OAuth on Bitbucket Cloud", as suggested in the comments by nick graziano.
这篇关于如何使用令牌来操作Bitbucket存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!