Fatal: Could not read password for 'https://OrganizationName@dev.azure.com': terminal prompts disabled

て烟熏妆下的殇ゞ 提交于 2019-12-02 05:20:25

As you mentioned you need to use PAT but in this way:

git push https://{PAT}@dev.azure.com/{organization}/{project}/_git/{repo-name}

Another solution is to "Allow scripts to access the OAuth token" in the job options:

In the git push use the System.AccessToken:

git push https://$env:SYSTEM_ACCESSTOKEN@dev.azure.com/......

And give push permissions to the build user (in the repo settings):

Please read git-credential-cache.

The point of this helper is to reduce the number of times you must type your username or password. For example:

$ git config credential.helper cache
$ git push http://example.com/repo.git
Username: <type your username>
Password: <type your password>

[Work for 5 more minutes]

$ git push http://example.com/repo.git

[Your credentials are used automatically]

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