0

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!

EvanB101
  • 19
  • 6
  • Could it be only due to the fact that you should not use your password but instead use a personal access token? https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=preview-page – Philippe Jan 16 '22 at 22:56
  • @philippe a Azure Static Website isn't the same thing as azure DevOps. It's tokens won't do any good here. – jessehouwing Jan 17 '22 at 08:51

1 Answers1

2
  • 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>
Harshitha Veeramalla
  • 1,515
  • 2
  • 10
  • 11