Howto query TFS 2013 API for git repositories in a

2019-04-11 16:19发布

Does anybody know how to get all git repositories within an TFS 2013 TeamProjectCollection? Documentation is very poor for git related stuff.

标签: git tfs2013
2条回答
放荡不羁爱自由
2楼-- · 2019-04-11 16:37

Have you tried looking at Microsoft.TeamFoundation.Git.Client?

Some pseudo code

GitHttpClient client = new GitHttpClient("collectionurl", creds)
var gitRepos = client.GetRepositoriesAsync().Result
查看更多
时光不老,我们不散
3楼-- · 2019-04-11 16:51

The Web API's are apparently the correct (and better documented) approach. e.g.

GET http://mytfsserver:8080/tfs/defaultcollection/_apis/git/repositories 

See: http://www.visualstudio.com/integrate/reference/reference-vso-git-repositories-vsi

查看更多
登录 后发表回答