Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Source tree fix for git Password authentication is temporarily disabled as part of a brownout. Please use a personal access token instead [duplicate]

FYI this is specifically for sourcetree I am having this error when pulling in sourcetree, it was working just fine yesterday but it suddenly had this error.

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks fetch origin
remote: Password authentication is temporarily disabled as part of a brownout. Please use a personal access token instead.
remote: Please see https://github.blog/2020-07-30-token-authentication-requirements-for-api-and-git-operations/ for more information.
fatal: unable to access 'https://github.com/London-Foster/frontend.git/': The requested URL returned error: 403

I tried having a personal access token and use it on source tree but still was not able to login.

like image 949
Bon Andre Opina Avatar asked Jun 30 '21 09:06

Bon Andre Opina


People also ask

How do I fix Authentication failed in SourceTree?

Ensure you are using an app password and that it is also correct (ensure there is no copy and paste error when copying the app password over to Sourcetree for Windows). Ensure Preferred Protocol is set to HTTPS. Hit Refresh Password. Make sure the page shows Authentication OK with the green checkmark, then hit OK.

How do I authenticate Gitlab in SourceTree?

From source tree, Tools/Option. Click Authentication tab, add account, choose gitlab and enter username as name of personal access token, password is Personal Access Token.


4 Answers

1 - Generate a new token from git dev settings

2 - In SourceTree, you just need to change your repository settings there:

enter image description here

enter image description here

3 - Change the URL/Path with the new format:

https://<USERNAME>:<TOKEN>@<GIT_URL>.git

enter image description here

4 - Press OK and it is good now!

like image 133
probitaille Avatar answered Oct 18 '22 01:10

probitaille


in source tree > open repo settings > remotes tab > edit the remote "URL/path" to be

https://{personal-access-token>@github.com}/{<my-repo>}.git>

then save and try to push

i did like @heratyian answer and works fine.

like image 20
Ebrahim Sayed Avatar answered Oct 18 '22 02:10

Ebrahim Sayed


Step by step using the terminal and github

  1. Remove repo
git remote remove origin
  1. Generate personal access token https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token

  2. Add remote back using personal access token

Remember to replace <personal-access-token> and <my-repo> with your credentials.

git remote add origin https://<personal-access-token>@github.com/<my-repo>.git>
like image 8
heratyian Avatar answered Oct 18 '22 01:10

heratyian


If on Windows, open the Credentials Manager and delete your github credentials if any.

If on macOS, open the Keychain Access app and delete your github credentials if any.

Then, get a Personal Access Token by following the guide here https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token

Then push your code as normal and when asked enter your newly generated personal access token.

like image 5
woland Avatar answered Oct 18 '22 00:10

woland