1 year ago

#321214

test-img

Ari

Unable to setup Spring Config server with bibucket

I'm trying to set up Spring Boot Config Server for a few microservices from the Bitbucket repo(earlier while learning tutorial I did the same using Github, it worked, but I think bitbucket is a little different).

Have added dependencies in Config-Server build.gradle

implementation 'org.springframework.cloud:spring-cloud-config-server'

Annotation added in the application class

@EnableConfigServer

Modified .properties file to .yml, and configured like this

server:
  port: 8012
spring:
  application:
    name: config-server
cloud:
  config:
    server:
    git:
      uri: ssh://bitbucket.org/project/repo.git
      ignore-local-ssh-settings: true
      clone-on-start: true
      passphrase: passphrase
      private-key: |
                   -----BEGIN RSA PRIVATE KEY-----
                   Proc-Type: 4,ENCRYPTED
                   DEK-Info: AES-128-CBC,***************************
                   
                   *************************************************
                   *************************************************
                   -----END RSA PRIVATE KEY-----

Have gone through multiple other SO posts. Tried with these ssh formats

git@bitbucket.org:project/repo.git >> failed to send channel request

ssh://git@bitbucket.org:project/repo.git >> extra / showed up because of jgit

ssh://bitbucket.org/project/repo.git >> giving auth fail

Now I'm confused. Did try adding this

strict-host-key-checking: false

nothing changed

Any help what am I missing?

bitbucket

spring-cloud

spring-cloud-config

jgit

0 Answers

Your Answer

Accepted video resources