spring - 从托管在 GitHub 上的 Spring Cloud Config Server 访问的 repo 的身份验证问题

标签 spring github spring-boot spring-cloud spring-cloud-config

我在 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/

相关文章:

git - 在两个分支上都完成许多提交后,如何将分支的特定提交推送到其他分支

spring - Thymeleaf 计数器变量不递增

java - 为什么不推荐使用 HibernateTemplate?

java - Spring 休息-发布文件

github - 如何使用 Bower 正确注册 github 分支

git - 如何使用带有 git 命令的 travis merge 到另一个分支?

java - 在 Spring Boot 中记录请求负载

java - Jpa 存储库查询 - java.lang.Object;不能转换到模型

java - 与注释为 @Transactional 的方法的调用者进行通信

java - Spring JdbcTemplate.update() 没有更新行