4

I'm trying the new Azure DevOps offering from Microsoft. My account is through my school (GeorgiaTech). I used an open source project for that (dcm4che). I had cloned the dcm4che repo from GitHub locally. Now trying to push it to Azure DevOps

➜  dcm4che git:(master) git remote add azure https://[email protected]/OHIF/dcm4che/_git/dcm4che
➜  dcm4che git:(master) git push -u azure --all
Password for 'https://[email protected]':
fatal: Authentication failed for 'https://[email protected]/OHIF/dcm4che/_git/dcm4che/'

surprisingly Azure didn't ask me for username. I don't know what should I do to provide username

6 Answers 6

3

Is not asking for username because in the git remote add you put the username before the repo URL: https://[email protected] - the OHIF@ before the URL tell git that you want to use the OHIF username and he asking password for this username.

Try this: git remote add azure https://dev.azure.com/OHIF/dcm4che/_git

Sign up to request clarification or add additional context in comments.

Comments

2

***Applicable if you are using Command line or Bash*

Typically, after git clone <url of repo> a pop-out screen would appear and let you login in your Microsoft Account.

However, some older versions of Git (e.g 2.17) doesn't show the pop-up for some reason but asks for a password.

First Solution: Just update your git to the latest version.

Second Solution But if you are in a restricted device (no admin rights etc) then this is the 2nd option: 1. Login to Azure Devops account, click on your Avatar then on "Security" enter image description here

  1. Create a new Personal Token having these parameters. enter image description here

  2. Copy the token somewhere and use this token as your password when you do git commands. enter image description here

1 Comment

Personal access token worked for me. Note: now you go to user settings > personal access token.
1

This is an issue with older versions of the Git Credential Manager that is included with Git For Windows and the new style that URLs that Azure DevOps uses. The new style URLs are those that start with https://dev.azure.com/. You shouldn't need to include a username.

I would recommend you update to the latest version of Git for Windows, which includes the latest Git Credential Manager, if possible. It can be downloaded from: https://git-scm.com/downloads. I believe the Git for Windows v2.19.0 or later includes a version of Git Credential Manager that works with these URLs.

Comments

0

This is a known issue with git-credential manager (bug report)

Quickest way to address this is to change the URL from

https://[email protected]/MY_USER/PROJECT/_git/REPOSITORY

into

https://MY_USER@MY_USER.visualstudio.com/PROJECT/_git/REPOSITORY

Comments

0

Only if u're using Visual studio 2017. This bug got fixed after i updated VS to 15.9.4. Things got to work though i have git version 2.17

Comments

0

In my case I used the Visual Studio Code GUI to set the password again:

how to do a fetch on VSCode

After click fetch git asked me the password to continue the process and there it worked!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.