Connect to Azure devops repo using sourcetree on MacOS

后端 未结 4 2101
无人共我
无人共我 2021-02-08 02:27

I\'ve created a new project on azure devops and now I\'m trying to add an account to sourcetree:

I\'ve setup the opions in the following way:

Host: Azure devops

相关标签:
4条回答
  • 2021-02-08 02:57

    You need to set up a Personal Access Token.

    The below is from the documentation

    Personal access tokens (PATs) are alternate passwords that you can use to authenticate in to Azure DevOps and Team Foundation Server (TFS). In this article, we walk you through how to create or revoke PATS.

    Azure DevOps Services and TFS use enterprise-grade authentication to help protect and secure your data. Clients like Visual Studio and Eclipse (with the Team Explorer Everywhere plug-in) also support Microsoft account and Azure AD authentication.

    For non-Microsoft tools that integrate into Azure DevOps but don't support Microsoft account or Azure AD authentication, you must use PATs. Examples include Git, NuGet, or Xcode. To set up PATs for non-Microsoft tools, use Git credential managers or create them manually.

    0 讨论(0)
  • 2021-02-08 03:03

    After surfing entire internet I found the answer.

    Refer this link and at Point 4., remember to add expiration date. By default it selects existing date, you need to select expiration date. It was this place where I did not select expiration date and it keeps throwing login error message.

    I selected 1year from today as expiration date, Full Access under Scopes.

    Your clone > HTTPS Link wont work. Like this URL

    Follow @Edward Thomson format to input URL

    Username: Your generated Token

    Password: Your generated Token (same as Username)

    OR

    Username: Your email to Azure DevOps

    Password: Your generated Token

    @taigi100 You can delete token by selecting revoke on Azure DevOps

    @taigi100 @Murray Foxcroft - Hope this helps.

    0 讨论(0)
  • 2021-02-08 03:05

    Basically, you need to:

    1. generate the PAT
    2. In Sourcetree, add a new account with the PAT as username AND as password
    3. If Sourcetree seems to be making you struggle (caching or not picking the right account if you have multiple) just add :yourorgname.visualstudio.com/projectname

    PS: I wrote a post on this (this one), check it out if you want the full details.

    0 讨论(0)
  • 2021-02-08 03:13

    Although SourceTree for macOS has updated the name of Azure DevOps (from "Visual Studio Team Services"), it appears that it does not support the new Azure DevOps URLs.

    You can use the old-format (VSTS-style) URLs. Instead of https://dev.azure.com/username, you can use https://username.visualstudio.com.

    Ironically, it seems that SourceTree for Windows still calls the product "Visual Studio Team Services" but supports the new-style Azure DevOps URLs.)

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