Authentication issue with repo accessed from Spring Cloud Config Server hosted on GitHub

前端 未结 2 1164
再見小時候
再見小時候 2021-02-19 19:34

I\'m hosting a configuration in a repo on GitHub. If I keep the repo public all\'s good, but if I make it private I face:

org.eclipse.jgit.errors.TransportExcept         


        
相关标签:
2条回答
  • 2021-02-19 19:44

    you need to add the

    spring.cloud.config.server.git.username=your_github_username
    spring.cloud.config.server.git.password=your_github_password
    

    and things should workout for you

    0 讨论(0)
  • 2021-02-19 20:01
     - SPRING_CLOUD_CONFIG_SERVER_GIT_USERNAME=XXXXX
      - SPRING_CLOUD_CONFIG_SERVER_GIT_PASSWORD=XXXXXXXXXXXX
      - SPRING_CLOUD_CONFIG_SERVER_GIT_DEFAULT-LABEL=branchXXXXX
    

    I am running this as docker, and it worked for me

    for the starter's this how I am using spring cloud server as docker container

    container_name: sccserver
    ports:
      - 8080:8080
    volumes:
      - /data/config-dir:/data
    environment:
      - EUREKA_HOST=$DOCKERHOST
      - scc_search_paths={application}, {application}/extended-attributes, {application}/feature-flags, {application}/properties, {application}/error-codes,{application}/seed-data,{application}/globalization,{application}/json-validator-schema,{application}/seedData
      - VIRTUAL_HOST=$DOCKERHOST
      - MESSAGING_HOST=$DOCKERHOST
      - SCC_GIT_URI=https://bitbucket.com/XXXXXXX.git 
      - "JAVA_OPTS=-Xmx512m"
      - SCC_GIT_SKIPSSLVALIDATION=true
      - SPRING_CLOUD_CONFIG_SERVER_GIT_USERNAME=
      - SPRING_CLOUD_CONFIG_SERVER_GIT_PASSWORD=
      - SPRING_CLOUD_CONFIG_SERVER_GIT_DEFAULT-LABEL=
    extra_hosts:
      - "dockerhost:$DOCKERHOST"
    

    ~

    0 讨论(0)
提交回复
热议问题