Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

using http access token with git submodule command

dekhaus March 5, 2024

 

Hi All
I can clone the repo I'm working with using an http access token ...

 

git clone -c http.extraHeader='Authorization: Bearer __replace_with_http_access_token__' https://stashweb.sd.apple.com/....
That works.
I now need to add the same repo as a git submodule to a project and can't seem to figure out the correct syntax for the git submodule add command .  More specifically - how do I issue a git submodule add command in which there is Authorization: Bearer that uses my http access token ?
Please respond to {REDACTED}
Thanks
Dave

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 6, 2024

Hi Dave,

The correct syntax is as follows for Bitbucket Cloud repositories:

git submodule add https://x-token-auth:{TOKENHERE}@bitbucket.org/{workspaceID}/{reposlug}.git 

NOTE: You will need to replace the placeholder values {TOKENHERE}, {workspaceID}, {reposlug} with actual values (removing the curly braces).

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events