Spring Cloud Config Framework:
I'm trying to integrate spring cloud config in java project with backend repository git which is bitbucket. Basically, I encounter two errors more frequently on different occasions.
2020-04-11 17:08:59.265 WARN 2792 --- [ main] .c.s.e.MultipleJGitEnvironmentRepository : Could not fetch remote for master remote: https://user@bitbucket.org/workspace/config-repo.git
In the above case, it uses the cached version and tomcat/undertow server start without any problems.
2020-04-11 17:09:03.774 INFO 2792 --- [ main] o.s.c.c.s.e.NativeEnvironmentRepository : Adding property source: file:/var/folders/6m/1cgw7zvn3rsb8j5kskflhvrr0000gn/T/config-repo-2822438633438126334/api-gateway.yml
2020-04-11 17:09:03.774 INFO 2792 --- [ main] o.s.c.c.s.e.NativeEnvironmentRepository : Adding property source: file:/var/folders/6m/1cgw7zvn3rsb8j5kskflhvrr0000gn/T/config-repo-2822438633438126334/discovery-service.yml
2020-04-11 17:09:03.775 INFO 2792 --- [ main] o.s.c.c.s.e.NativeEnvironmentRepository : Adding property source: file:/var/folders/6m/1cgw7zvn3rsb8j5kskflhvrr0000gn/T/config-repo-2822438633438126334/config-service.yml
Git Version:
git version 2.24.0
Error 1: git-upload-pack
2020-04-11 00:00:20 - WARN Error occurred cloning to base directory.
org.eclipse.jgit.api.errors.TransportException: https://<username>@bitbucket.org/<workspace>/config-repo.git: git-upload-pack not permitted on 'https://beatles89@bitbucket.org/workspace/config-repo.git/'
Starting the spring cloud config server, and I received this error randomly. After digging into this issue, I found that git-upload-pack is not supported on bitbucket. But it was reported 2 years ago here, and suggested to revert the GIT version.
Error 2: authentication not supported
org.eclipse.jgit.api.errors.TransportException: https://bitbucket.org/user/repo.git: authentication not supported
This above error I get when hit the /refresh
on actuator to get the refreshed properties from remote config repository. Sometimes it work without any errors and sometimes it throws above error.
curl localhost:8060/refresh -d {} -H "Content-Type: application/json"
Actuator Refresh Command Error:
{"timestamp":"2020-04-10T16:35:41.144+0000","status":500,"error":"Internal Server Error","message":"Request processing failed; nested exception is org.springframework.cloud.config.server.environment.NoSuchRepositoryException: Cannot clone or checkout repository: https://beatles89@bitbucket.org/augmentedcloud/ac-config-repo.git","path":"/refresh"}
Note: As a side note, I have cloned the specified repository separately for testing and it worked without any authentication issues.