We are configuring spring cloud config server and below is how my application properties look:
server.port=8080
spring.cloud.config.server.git.uri=https://github.com/myorganization/config-store.git
spring.cloud.config.server.git.searchPaths={application}
spring.cloud.config.server.git.clone-on-start=true
spring.cloud.config.server.git.skipSslValidation=true
spring.cloud.config.server.git.ignore-local-ssh-settings=true
spring.cloud.config.server.git.username=MyUser
spring.cloud.config.server.git.password=MyPassword
spring.cloud.config.server.git.default-label=develop
spring.application.name=config-server
spring.security.user.name=root
spring.security.user.password=password
I am able to login to the github url i.e. https://github.com/myorganization/config-store.git using the username MyUser and password MyPassword as per above properties but when i am trying to start my config server using: ./mvnw spring-boot:run i am getting the below error:
Caused by: org.eclipse.jgit.errors.TransportException: https://github.com/myorganization/config-store.git: not authorized
i have tried out many things but running out of any ideas now, would appreciate any help in advance.
Beginning August 13, 2021, we will no longer accept account passwords when authenticating Git operations on GitHub.com.
From : https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/
Thx to: https://stackoverflow.com/a/70443213/592355
For Github Enterprise Server, our options (also) are limited, but considered secure & well documented:
Authenticating with the API
You can authenticate with the API in different ways. ...
- Personal access tokens (-> 1. https://stackoverflow.com/a/69663073/592355, 2. https://stackoverflow.com/a/70580891/592355 ?)
- OAuth Apps...
- GitHub Apps...
Authenticating with the command line
...
- HTTPS ...
- SSH ...
When SSH, for the spring-cloud-end:
Use "local ssh environment" or see: https://docs.spring.io/spring-cloud-config/docs/current/reference/html/#_git_ssh_configuration_using_properties