1

I am using VS2015 and working with a team which uses bitbucket to share the code. Every time I am trying to push my changes to the branch or sync it I get this error:

Opening repositories:
C:\path\to\the\Repos\nameofrepository
 Error encountered while pushing to the remote repository: Response status 
 code does not indicate success: 401 (Unauthorized).

Every time I press the push or sync button I am asked to enter my credentials (username and password) to connect to my bitbucket account. The credentials are correct, for that I am 100% sure.

I have looked in the internet and found that this error may be caused by the entering wrong credentials(which i didnt) so I went to the "Windows Credential Manager" and reset all the credentials there, tho I didn't find any relevant to VS. Nothing I have tried worked.

Does anyone know why does this happens?

PS: I don't have a 2 ways verification enable in my account. Thanks

noel293
  • 466
  • 4
  • 18

2 Answers2

0

Solution 1 :

I think Insufficient privileges on the git-project (i.e. only read) will
give you this error.

Give required permisson to the project folder & Try again.

Solution 2 :

Remove the credentials GitHub saves in your local machine.

Here are the steps I took:

  • Go to control panel
  • Top right : Search "Credentials" => select "Credential Manager"
  • Under Generic credentials => You should see GitHub => click on arrow
  • Click on "Remove from vault"
  • Try to commit and sync again
LuFFy
  • 6,603
  • 10
  • 36
  • 57
  • Solution 1 is not applicant as the folder has full permission. Solution 2 as I have said above I already tried it. – noel293 Jun 27 '17 at 10:24
  • Please Go through [THIS QUESTION's ANSWERS](https://stackoverflow.com/questions/15174194/jenkins-host-key-verification-failed), Try the solutions given. – LuFFy Jun 27 '17 at 10:29
0

After trying everything on the web I came to the conclusion that there was nothing I could do, so I deleted my account and created a new one. Now everything works fine.

noel293
  • 466
  • 4
  • 18