Last active
January 8, 2018 05:16
-
-
Save droidMakk/583cfe96d7f6f8a7e239764bf6f353ab to your computer and use it in GitHub Desktop.
Generate OAuth Token : CURL - Bitbucket
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Request | |
-------------------------------------------------------- | |
curl -X POST https://bitbucket.org/site/oauth2/access_token \ | |
-d grant_type=client_credentials \ | |
-u user_key:user_secret \ | |
-------------------------------------------------------- | |
Response | |
-------------------------------------------------------- | |
{ | |
"access_token" : "your token", | |
"scopes" : "scope of token", | |
"expires_in" : "Time in Milliseconds", | |
"refresh_token" : "your refresh token", | |
"token_type" : "bearer" | |
} | |
--------------------------------------------------------- | |
Token usage to clone a repository | |
--------------------------------------------------------- | |
git clone https://x-token-auth:{ Your Token }@bitbucket.org/user_or_orgname/repo_name.git | |
Note : | |
--------------------------------------------------------- | |
The Token Expires in an Hour |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment