Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Connecting to Bitbucket with command line git (Using account with oauth and 2FA)

I cannot find at all any information on how I can connect my account for this.


I'm doing remote development on an embedded system and compiling on the system due to headaches attempting to get cross-compiling to work. I cannot figure out how to have the git repo on the device push to bitbucket, as I have no password for the account and it uses 2FA. My best guess is that I'd have to use the API somehow but I couldn't find anything telling me how to actually get an API key (creating a token doesn't seem to do it) nor how to set up git to authenticate using that.

1 answer

1 accepted

1 vote
Answer accepted
Caroline R Atlassian Team Dec 16, 2021

Hi, @Ethan Allred! Welcome to the community! 

In this case, you can either create an App Password or an SSH key to authenticate to the remote Bitbucket repositories.

In order to create an App Password, you can follow the next steps:

  1. From your avatar in the bottom left, click Personal Settings;

  2. Click App passwords under Access management;

  3. Click Create app password;

  4. Give the app password a name related to the application that will use the password;

  5. Select the specific access and permissions you want this application password to have;

  6. Copy the generated password and either record or paste it into the application you want to give access to. 

  7. The password is only displayed this one time.

If you would like to read more about App Passwords you can access this documentation: App passwords.

In case you would like to create an SSH key, the following documentation has a very good explanation on how to create and add it to Bitbucket:

Please let me know if you need any help with this process, I will be happy to assist you. 

Kind regards,

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events