首先,在配置中檢查要讀取的分支是否正確,從2020年幾月份開始,github上的master分支變為了mian分支,因此yml中讀取分支的配置應該是:label: main
其次,如果yml使用的是uri: git@github.com:springcloud-config.git這種ssh方式連接的話,需要進行其他的配置,因此我放棄了這種方式進行配置,而采用http/https方式進行配置,值得注意的是,采用http和https方式,如果沒配置免密的話,需要在組態檔中加入密碼及用戶名,
詳細案例如下
server:
port: 3344
spring:
application:
name: cloud-config-center #注冊進Eureka服務器的微服務名
cloud:
config:
server:
git:
####倉庫地址
uri: https://github.com/wang692/springcloud-config.git #GitHub上面的git倉庫名字
####搜索目錄,即倉庫名
search-paths:
- springcloud-config
####讀取分支,main即代表springcloud-config倉庫的master分支
label: main
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/252168.html
標籤:其他
上一篇:deepin20.1系統安裝MySQL8.0.23(最美國產Liunx系統,最新,最詳細的MySQL8安裝教程)
