fatal: could not read Username for visualstudio.com Device not configured

為{幸葍}努か 提交于 2019-12-24 09:39:28

问题


I get this error when trying to push to my remote repo via sourcetree:

Pushing to https://xxx.visualstudio.com/DefaultCollection/_git/xxx error: git-credential-sourcetree died of signal 5 fatal: could not read Username for 'https://xxx.visualstudio.com': Device not configured

How do I configure this in sourcetree?

I have a personal access token but I don't know how to give it to sourcetree.

I'm on mac.


回答1:


I am using VSTS and encountered this problem after upgrade sourcetree. I tried to use gitflow to finish release, then the error message is:

fatal: could not read Username for 'https://xxxx.visualstudio.com': Device not configured
Fatal: Could not fetch release/xxxx from origin.

I solved this problem by following steps:

  1. Update my system git to newest version 2.17.1 in my case. Please refer to https://www.atlassian.com/git/tutorials/install-git
  2. Set up git-credential-osxkeychain helper according to https://www.atlassian.com/git/tutorials/install-git#install-the-git-credential-osx
  3. git clone same repository which I have problem.
  4. Do gitflow finish release again, it works without any error message.

Hope these steps can help someone has same problem with me.




回答2:


I had to delete the repo in sourcetree and clone it to sourcetree using an existing remote git url (which is not how I got it into sourcetree initially). Once this is done, then Sourcetree will add your user credentials. Not really sure on the details such as why it works but at least it works, so it might be able to help others in that situation.



来源:https://stackoverflow.com/questions/41197696/fatal-could-not-read-username-for-visualstudio-com-device-not-configured

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!