Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Relationship of the git credentials and the App key

BertWe July 22, 2019

Last week I added an App key (read only) to my account for a backup tool. Now I'm not able to push changes to origin anymore, using hhtps with credentials.
After revoking the app key, I got write access back.

So my question, will an app key replace my "normal" membership of the team? I'm in the admistrator group.

Or how can I create an app key for a automated tool with read access only? And keeping my read/write access.

 

Best Regards 

3 answers

1 accepted

1 vote
Answer accepted
BertWe July 22, 2019

Hi,

yes you are right its called app passwords.

I used the git bash under windows to push my commits to origin. Here is the output:

Pushing master
Remote: Your credentials lack one or more required privilege scopes.
Error encountered while pushing to the remote repository: Git failed with a fatal error.
unable to access 'https://....git/': The requested URL returned error: 403

Pulling and cloning worls like a charm. After revoking the app password I tried to push again and here git was asking for my credentials and it was working again.

Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 22, 2019

I can think of two potential causes of this:

  1. You might be putting your app password into the repository push URL. What does that URL look like? You can find it out by running git remote -v in the repository in question.
  2. Your Git credential manager might be caching the app password when you try it out, and keeps using it until you revoke it because Bitbucket starts returning 401 (invalid credentials) instead of 403 (valid credentials but not enough permissions for the requested operation).

I'm guessing only based on that you mentioned that git asked for your credentials after your revoked the app password – how did you let it use the app password initially?

Cheers,
Daniil

Like Baitoeikp likes this
1 vote
BertWe July 22, 2019

This morning I did some testing.

  • the git repository urls are correct (they are working before and after)
  • creating an app password does not cause any sideeffects for authenticating with the credentials
  • The problem was an interference over the windows credential store:
    The backup tool uses the username and app password for the git repo access (to mirror them in a backup location). Now the app password was overwriting my "normal" password in the credential store. 
    Simply deleting the credential in the store and I was able to enter my password again and its working as before.

Thx for your help.

Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 23, 2019

No worries, happy to help.

I'm glad that you identified the root cause.

Cheers,
Daniil

0 votes
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 22, 2019

Hello @BertWe,

Will an app key replace my "normal" membership of the team?

Did you mean app passwords? If so, then no, app passwords never replace or shadow your regular credentials.

Now I'm not able to push changes to origin anymore, using https with credentials.

What operations did you actually run and what errors did you get back?

Cheers,
Daniil

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events