【问题标题】:How to access the folder of a project directly in gitlab?如何在gitlab中直接访问项目的文件夹?
【发布时间】:2018-08-26 19:20:07
【问题描述】:

我已经按照链接https://docs.gitlab.com/ee/api/repository_files.html进行了尝试

我得到了项目 ID。问题是我不确定如何提供文件路径。 当我给

http://{domain}/api/v3/projects/{id}/repository/files

,得到错误为

{
    "message": "400 (Bad request) \"file_path\" not given"
}

当我给予时

http://{domain}/api/v3/projects/{id}/repository/files/src/main/resources/test.xml

,然后得到

404

错误。 我的 gitlab 结构是

http://{domain}/namespace/{test-component}/src/main/resources/test.xml

。赋予文件夹结构的正确方法是什么?我在哪里可以获得文件夹结构?

【问题讨论】:

    标签: gitlab gitlab-api


    【解决方案1】:

    根据文档尝试http://{domain}/api/v3/projects/{id}/repository/files/src/main/resources? file_path=test.xml&ref=master

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-07-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-08-28
      • 2012-04-04
      • 2015-03-20
      • 2018-06-01
      相关资源
      最近更新 更多