gpt4 book ai didi

带有 OAuth2(或任何其他 HTTP header 身份验证)的 Maven 存储库

转载 作者:行者123 更新时间:2023-12-03 03:07:45 25 4
gpt4 key购买 nike

我正在尝试使用 Gitlab 存储库作为我的依赖项的私有(private) maven 存储库。部署过程运行良好(类似 as described here ),但更加简化)。

不,我正在尝试添加依赖项,这似乎不起作用。在 Maven 中,这似乎是可能的( as described here )。但在 Gradle 中只有 BasicAuth 或 s AWS s3 token seem to be supported .

有什么方法可以将自定义 header 添加到对 Maven 存储库的请求中?或者有什么方法可以使用 OAuth2-authentification?

如果没有,你能告诉我从哪里开始实现它吗?

最佳答案

The best piece of information我可以得到 2 1/2 岁,它来自 Gradle 核心开发:

Currently this is not possible. We want to potentially support more authentication schemes but there are no plans to support OAuth2 at this time.



还有这个3岁 secret Gradle Git Repo Plugin但是有一个“大”的对应物:

Private maven repos however, aren't easily accessible via the standard maven http interface, or at least I haven't figured out how to get the authentication right. This plugin simply clones the repo behind the scenes and uses it as a local repo, so if you have permissions to clone the repo you can access it.



所以基本上你被卡住了。

关于带有 OAuth2(或任何其他 HTTP header 身份验证)的 Maven 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50522734/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com