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

Using a different git account

Ishant Jindal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 29, 2024

Greetings,

I am new to Bitbucket. 

I have previously installed git and set it to a different email. Recently one of my clients provided me a new email address and repo access to that email. When I am cloning the repo it throws an 'invalid credentials' error. 

Things I have tried.

1) added my new email using git config user.email command.

Any help would be appreciated.

Thanks & Regards,

1 answer

1 accepted

2 votes
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 30, 2024

Hello @Ishant Jindal and welcome to the Community!

Based on your description, I suspect you are trying to clone over HTTPS. The credentials for the git clone are different from the ones used to log in to the UI.

To clone a git repository using HTTPS you'll need to use a command as follows : 

git clone https://{username}:{app_password}@bitbucket.org/{workspace}/{repository}.git

where :

  • username : it's your bitbucket account username (not email address). You can check the current username (and change if you want) by navigating to your personal bitbucket settings
  • app password: a token used to authenticate git operations and API calls. If you haven't already, you can create a new app password under your account.

It's important that the credentials above are from the account where you have access to the repository

Could you try using those credentials for authentication and let us know how it goes? 

Thank you, @Ishant Jindal !

Patrik S

Ishant Jindal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 30, 2024

Hey, the mentioned method worked just fine. Thanks for the help.

 

Best Regards,

Ishant

Like Patrik S likes this

Suggest an answer

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

Atlassian Community Events