Cloning Git Repo using TFS Personal Access Token

后端 未结 4 1211
醉话见心
醉话见心 2021-02-02 17:23

I am trying to programmatically clone a git repository. My ASP.NET MVC application is creating and starting a process. The code to handle the processes works correctly however t

4条回答
  •  孤独总比滥情好
    2021-02-02 17:58

    Just adding my 2c since I've spent hours on this.

    I generated the PAT from DevOps and copied the clone URL but I kept get "repository not found"

    GIT clone https://@dev.azure.com/Organization/My%20Project/_git/MyRepo
    

    Note the project has a space in it and is URLEncoded

    This won't work in DOS - it resolves to

    My0Project
    

    You need to double escape it like so:

    GIT clone https://@dev.azure.com/Organization/My%%20Project/_git/MyRepo
    

提交回复
热议问题