我在 GitHub 上的存储库中托管配置。如果我将 repo 公开一切都很好,但如果我将其设为私有(private),我将面临:
org.eclipse.jgit.errors.TransportException:
https://github.com/my-user/my-repo:
Authentication is required but no CredentialsProvider has been registered
我用来定位 repo 的属性是
spring.cloud.config.server.git.uri=https://github.com/my-user/my-repo
我应该怎么做才能使用私有(private)仓库正确配置它,谢谢
最佳答案
你需要添加
spring.cloud.config.server.git.username=your_github_username
spring.cloud.config.server.git.password=your_github_password
事情应该为你锻炼
关于spring - 从托管在 GitHub 上的 Spring Cloud Config Server 访问的 repo 的身份验证问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39922594/