Authentication failed for Azure Git

后端 未结 18 998
攒了一身酷
攒了一身酷 2020-12-31 03:19

I\'m trying to clone my webapp in Azure.

When I run git clone https://username@appname.scm.azurewebsites.net:443/appname.git the terminal asks me for my

相关标签:
18条回答
  • 2020-12-31 03:53

    In my case none of the above methods solved my issue (but they directed me to find out where I'm going wrong)

    I tried both auto generated App credentials and my custom created user credentials, and every time I was getting authentication failed message.

    The description on the credentials page was advising me to have the username in the following format:
    <app-name>\<username>

    This was why authentication failed. As soon as I put my username without the <app-name> prefix the authentication passed and everything worked smoothly.

    Hope this information helps

    0 讨论(0)
  • 2020-12-31 03:54

    I had the same problem when try to git clone https://<username>@praat.scm.azurewebsites.net:443/<repo-name>.git . I solved the problem by removing the port.

    So your new url should not have the port 443.

    0 讨论(0)
  • 2020-12-31 03:56

    Yes many of the answers here are pointing to the correct path, but my case:- I was given an url to access git repos on azure cloud for which I'm perfectly fine to access/browse the code on browser (Vs) when I'm trying to clone I've got the same issue.

    So when you click on clone as shown in below image, you've to Generate Git credentials, this is weird, not sure why, probably they've setup my account to access azure cloud, which can't be used to clone git repos(means can't be used as git credentials), this is something different from what I've seen with AWS/gitlab/bitbucket, maybe an issue with account setup, or if it's common thing for repos on Azure & if you're in same issue - give it a try.

    Another one, as everyone has already mentioned, please don't try to connect to url which is produced over there (something looks like):

    https://project-account@dev.azure.com/project-name/apps/_git/library/
    

    instead try to connect thru your GIT username & then use password :

    https://username@dev.azure.com/project-name/apps/_git/library/
    

    as a tip if your username has special characters in it, Git cmd/bash will through errors, So replace those with valid characters, ex. :-

    1. @ can be replaced with %40
    2. + can be replaced with %2B

    something like : https://username%40xyz.com@dev.azure.com/project-name/apps/_git/library/

    0 讨论(0)
  • 2020-12-31 03:56

    this may help: with my first webapp, i had to go to Deployment Center, Deployment Credentials. And then use either the App Credentials or create User Credentials. After this, delete the cached credentials on the local machine (windows: Control Panel\User Accounts\Credential Manager). run "git push webapp master:master" again, enter either of the Deployment Credentials. That worked.

    0 讨论(0)
  • 2020-12-31 03:57

    I had a similar problem where the automatically generated git clone url was:

    https://group-admin-account-username@dev.azure.com/site.git
    

    So instead I had to replace this with my own account username

    https://my-username@dev.azure.com/site.git 
    

    This then prompted me for the password for my account correctly:

    git clone https://my-username@dev.azure.com/site.git 
    
    0 讨论(0)
  • 2020-12-31 03:58

    Assuming you're entering the correct password each time, it might be a delay/propagation issue.

    You can also use your Site-Level credentials as detailed on this wiki page. You can get these by downloading your publishing credentials in the Portal via the "Get Publish Profile" option on your main WebApp bar. The user name / password can then be found in the yourapp.PublishSettings file and will look something like userName="$yourapp" userPWD="ABC123". This is only mentioned as a workaround if your User-Level credentials are not working (which they should be if they are correct).

    0 讨论(0)
提交回复
热议问题