Howto query TFS 2013 API for git repositories in a TeamProjectCollection?

我是研究僧i 提交于 2019-12-09 19:04:26

问题


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


回答1:


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

Some pseudo code

GitHttpClient client = new GitHttpClient("collectionurl", creds)
var gitRepos = client.GetRepositoriesAsync().Result



回答2:


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



来源:https://stackoverflow.com/questions/20173687/howto-query-tfs-2013-api-for-git-repositories-in-a-teamprojectcollection

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!