-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.1.0.RC3 can not use local ssh settings #1251
Comments
Please use Greenwich.RELEASE and try again. If you can reproduce the problem with Greenwich.RELEASE can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file. |
@ryanjbaxter i'm sorry, what is Greenwich.RELEASE, do you mean 2.1.0.RELEASE? |
I started this git server locally https://hub.docker.com/r/jkarlos/git-server-docker/ |
@ryanjbaxter is it possible that this git server does not need local ssh settings? could you change the spring.cloud.config.server.git.uri to this project, since i have already tested github, and it's the same error. |
@ryanjbaxter i have tested my demo on Ubuntu, everything worked well. |
Could it be something with ssh on windows? I cant really say, no one on the team uses Windows so we cannot test. |
In any case it does not sounds like this is a problem with Spring Cloud Config since we dont have any OS specific code. It could be something with JGIT I suppose. |
Did you use the same JDK on Ubuntu? |
Maybe use JGIT directly without Spring Cloud and see if you get a similar issue? |
@ryanjbaxter i think you're right, maybe this really has nothing to do with spring-cloud-config. could you please mark this issue as help-wanted, maybe someone will come with an solution someday? if not, you can close this issue anyway, thanks. |
I will close it, if someone else finds the issue they can comment and we can try to address it |
Facing the same issue Bootstrap.yml:
Exception:
@ryanjbaxter any idea? |
Got it sorted!
only when you will directly point it to
even though the key is definitely valid, in that case, you may help 2nd step:
where here is the command:
|
@Bryksin I'm having the same issue and tried your fix and still getting auth failed. My config file looks like:
And my application.properties looks like: spring.cloud.config.server.git.uri=git@github.com:xxx/Config.git |
I know this is an old issue page but the problem still exists and this is the first link that comes up on Google, so I'm just posting this for reference. The problem is actually related to JGit and how you generate your SSH key pairs. If you use
Edit: This is only true if you are using an older version of spring-cloud-config-server (e.g. 3.0.4 or older or SpringBoot v2.4.x or older) |
@emrekgn actually we are using 5.12.x |
Thanks for the clarification @ryanjbaxter. It's my bad I didn't write the SpringBoot version (v2.4.9) in the first post, so the problem is just using an older version of Spring Cloud Config. (I'm looking at Spring Initializr) SpringBoot 2.4.x with Spring Cloud Config Server dependency comes with spring-cloud-config-server v3.0.4 which depends on JGit v5.1.3. So I think if I just use a newer version (3.1.0), it should be resolved. Thanks again! |
Any news? im trying the steps of @Bryksin but im strill getting the Invalid Privatekey error. this is my yml config git: and im getting:
|
means that you are using OpenSSH key format. Convert the private key into old RSA format or create a new one pair. I'm struggling with such issue. I'm on Linux.
~/.ssh/config has these lines:
My spring boot version is 2.6.8, spring cloud version is 2021.0.1 and jgit is up to 5.9.0.202009080501-r (the latest 5.x version at the moment). My config is
And I get the exception:
Last logs jgit shows are:
|
you may see the issue here too, i post it there first.
actually i have test 2.0.1.RELEASE 2.1.0.RC3. for more details, spring boot version 2.0.5 2.1.0 2.1.1 2.1.2
with 2.0.1.RELEASE, you can config git config server like below
but others, this does not work.
i'd like to consider this a bug of jgit, but i changed jgit manually from 5.1.3.201810200350-r to 4.11.0.201803080745-r, which is the version used by sb 2.0.1.RELEASE, still does not work, and the error is the same.
and 5.2.1.201812262042-r also the same.
and i guarantee that there is everything you need to clone a project below user's home. git clone in the command line worked vast well.
and my computer is windows 10, jdk 1.8.0_201
and the exception is below:
The text was updated successfully, but these errors were encountered: