Azure DevOps 匯入其他地方的Repos到團隊Repos

Edward Kuo
Aug 5 · 2 min read
Image for post
Image for post

如果今天版控的Repos是放在其他地方或是在Azure DevOps的其他團隊內,那要怎樣把程式碼搬移到Azure DevOps 上面呢?如下圖,在可以在Repos的地方看到有Import Repository

Image for post
Image for post

點選之後,會出現Import的畫面

Image for post
Image for post

主要就是要取得想要Clone的Repos的URL,如果是公開的Repos URL只要把位置填上去就可以,並將要匯入到目的地的Repos Name給取好就可以。

不過,如果今天是要從Azure DevOps其他的團隊專案內的Repos,就必須透過驗證方式才可以

Image for post
Image for post

因此,就必須在來源端建立一組PAT Key,然後上圖的紅框中輸入來源端的帳號與該帳號的PAT Key,一旦成功後就可以看到下面畫面

Image for post
Image for post

如果Repos不大,基本上速度是很快的。而通常這邊會發生Clone失敗,很多都是在驗證地方出錯,此外,雖然上面是寫說可以用Password或PAT,經過測試幾次,如果是Azure DevOps對上Azure DevOps是需要用PAT Key,如果是使用帳號密碼方式則會發生失敗

EK.Technology Learn

Design,Thinking,Coding & have fun every thing

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store