Git訪問TFS出現許可權不足(Using Personal Access Tokens to access Visual Studio Online)

來源:互聯網
上載者:User

標籤:

使用GIT複製TFS伺服器上的代碼到本地時出現錯誤如下:

fatal: Authentication failed for ‘https://***.visualstudio.com/***Project/_git/***/‘

解決辦法:

原文請查看(https://roadtoalm.com/2015/07/22/using-personal-access-tokens-to-access-visual-studio-online/)

People who use Visual Studio Online for a while are probably familiar with the alternate credentials. These are used when accessing the REST API or when using an external client for accessing your Git repositories.

You configure your alternate credentials on your [My Profile] page and fill a username and password of your choice.

Once you enable your credentials, you can use these credentials when doing a REST call or (easier to test) clone a Git repository

This is great but not the most secure way of doing things.

 Personal Access Tokens

In the update of July 7th, we now have the ability to use Personal Access Tokens as an alternative to the Alternate Credentials. Instead of sending our username and password over the wire we an now use a secure token that we can scope to a timeframe and to functionality within VSO. On the [My Profile] page you can configure one or more Personal Access Tokens. For example a token to access Code Features.

When you create the token, you see a token (only visible after creation !) that you should copy and keep safe.

This token alone is sufficient to authenticate against VSO. So when you now clone a Git repository you only have to fill in this token in the password box. Username can be empty or any value

The great thing is that you can revoke rights or the token afterwards and make sure that people cannot access stuff anymore.

Hope this helps!

Git訪問TFS出現許可權不足(Using Personal Access Tokens to access Visual Studio Online)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.