访问Gitlab扣除文件夹中的文件

发布于 2025-02-01 12:37:26 字数 854 浏览 4 评论 0原文

我能够访问.config文件。

https://gitlab.agile.nat.bt.com/api/v4/projects/12835/repository/files/Nuget.config/raw?ref=master&private_token=ixUu9xMdnvhS5R-qYSj1

根据以下内容,它具有nuget.config文件。我可以访问它。但是我有兴趣在环境文件中获取文件。内部环境文件文件夹中有一个ABC.xml文件。我想读取XML文件。

[
 {
    "id": "de9688b5f473ce27cb089f0d34b5a06a81847301",
    "name": "**EnvironmentFiles**",
    "type": "tree",
    "path": "EnvironmentFiles",
    "mode": "040000"
  },
  {
    "id": "7b7031bcbedb161f54f59aa8faf2689d298ad6ca",
    "name": "**Nuget.config**",
    "type": "blob",
    "path": "Nuget.config",
    "mode": "100644"
  }
]

我可以通过运行下面的URL看到XML文件。但是我无法获取XML文件。

https://gitlab.agile.nat.bt.com/api/v4/projects/12835/repository/tree?path=EnvironmentFiles&private_token=ixUu9xMdnvhS5R-qYSj1

我如何访问XML文件

I am able to access the .config file.

https://gitlab.agile.nat.bt.com/api/v4/projects/12835/repository/files/Nuget.config/raw?ref=master&private_token=ixUu9xMdnvhS5R-qYSj1

As per below , it has nuget.config file. which I am able to access it. But I am interested to fetch file inside EnvironmentFiles. Inside EnvironmentFiles folder it has a abc.xml file.I want to read the xml file.

[
 {
    "id": "de9688b5f473ce27cb089f0d34b5a06a81847301",
    "name": "**EnvironmentFiles**",
    "type": "tree",
    "path": "EnvironmentFiles",
    "mode": "040000"
  },
  {
    "id": "7b7031bcbedb161f54f59aa8faf2689d298ad6ca",
    "name": "**Nuget.config**",
    "type": "blob",
    "path": "Nuget.config",
    "mode": "100644"
  }
]

I am able to see the xml file by running the below url. But I am not able to fetch the xml file.

https://gitlab.agile.nat.bt.com/api/v4/projects/12835/repository/tree?path=EnvironmentFiles&private_token=ixUu9xMdnvhS5R-qYSj1

How shall I access the xml file

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文