【问题标题】:Spring Cloud Config Server with git backend using github access token带有 git 后端的 Spring Cloud Config Server 使用 github 访问令牌
【发布时间】:2020-01-18 05:33:47
【问题描述】:

我无法访问我的 github 存储库

我有私有 github 存储库,其中包含两因素身份验证作为我的 Spring Cloud Config 服务器的配置存储。

我想使用 github 访问令牌进行授权

我的 application.yml 包含:

cloud:
    config:
      server:
        git:
        uri: https://oauth2:<my_token_here>@github.com/<my_repo_here>.git

我遇到了一个错误

org.eclipse.jgit.errors.TransportException: https://oauth2@github.com/<my_repo_here>.git: Authentication is required but no CredentialsProvider has been registered

【问题讨论】:

    标签: spring-cloud-config


    【解决方案1】:

    你需要添加

    spring.cloud.config.server.git.username=your_github_username spring.cloud.config.server.git.password=your_github_password

    事情应该适合你

    【讨论】:

    • 添加到引导文件
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-09-21
    • 1970-01-01
    • 2021-05-25
    • 2023-01-27
    • 1970-01-01
    • 1970-01-01
    • 2021-07-08
    相关资源
    最近更新 更多