【问题标题】:How to call "git pull" through rest api in TFS?如何通过 TFS 中的 rest api 调用“git pull”?
【发布时间】:2016-10-02 01:39:38
【问题描述】:

最近几天我一直在研究 TFS,我尝试通过 rest api 实现“git pull”。

我关注了 Rest api Doc

https://www.visualstudio.com/en-us/docs/integrate/api/git/overview

文档具有“创建、删除、查看”功能。 我不确定,如何使用 TFS rest api 拉 git repo。

请给我一些建议或博客来解决这个问题。

提前致谢:)

【问题讨论】:

  • VSTS Rest API 不支持“拉”动作,你可以使用 Giulio 提到的“libgit2”。
  • 我用过这个网址-git clone https://$GH_TOKEN@github.com/owner/repo.git

标签: tfs azure-devops


【解决方案1】:

git.exe 作为进程调用或使用libgit2libgit2sharp 等客户端库。

TFS/VSTS 实现了标准 Git HTTP 协议(​​请参阅Smart HTTP),因此无需为标准 Git 操作使用特殊的自定义 API。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-06-21
    • 2019-01-01
    • 1970-01-01
    • 2017-08-05
    • 2018-03-23
    • 2015-07-08
    • 1970-01-01
    • 2013-02-25
    相关资源
    最近更新 更多