Home > OS >  Authentication Failed for Git push to Azure
Authentication Failed for Git push to Azure

Time:01-18

I am trying to deploy a web app to Microsoft Azure. Everything works succesfully in creating the app and it appers in the Azure portal. When I try to push my repo to Azure it asks me to enter my user credentials with an password authentication popup like the php quickstart said. The problem is whenever I enter the password which I know is right I get this error in git bash:

     fatal: Authentication failed for 
     'https://xxxxxxxxx.scm.azurewebsites.net/xxxxxxxxxx.git/'

I have seen a few answers where they say to use a url with :443 at the end and I found that url on the azure portal, but whenever I try to add that url remote I get this error:

 error: remote azure already exists.

I have tried resetting my password and that does not work either. If anyone could help with just one of these problems that would be awesome. Comment if I can add anything or if I should clarify somthing. Thank you!

CodePudding user response:

  • Looks like remote with the name azure already exists on your system and that remote contains the url "https://***.scm.azurewebsites.net/.git".

  • The error message says that, The remote already exists.

  • You are trying to add a remote called "azure" that it already exists in your configuration.

  • Add a new remote with new name like "newazure" with it's URL as you want.

  • Follow the below command to add new:-

git remote add newazure https://***.scm.azurewebsites.net/***.git

OR

  • Remove the remote azure first, then add again with the path.
$ git remote rm azure
$ git remote add azure <repo-url> 

Another way:
Set the azure's url instead of adding.

$ git remote set-url azure <repo-url>
  •  Tags:  
  • Related