簡體   English   中英

帶有AWS Code Commit的Spring Cloud配置身份驗證

[英]Spring Cloud config authentication with AWS Code Commit

我是新手,無法使用Spring Cloud Config服務器,因此對我來說還是第一次。我希望我能得到幫助,在此先感謝您。 我可以嘗試做的是將Spring cloud Configuration Server配置為所有微服務之間配置的中央服務器。 我們正在使用AWS CodeCommit作為SCM存儲庫。 問題是,一旦嘗試在AWS CC上訪問現有文件,我總是收到相同的錯誤。 我想是身份驗證的問題,但是我不確定錯誤屏幕截圖這是Spring CSC上的引導程序配置

server.port=9090
management.security.enabled=false
logging.level.org.springframework.web: TRACE
spring.application.name=config-service
spring.cloud.config.server.git.uri: https://git-codecommit.eu-west-1.amazonaws.com/v1/repos/ServiceLayer

這是我要調用的SCM存儲庫中的文件:

configuration:  
  projectName: ms-login
server:  
  port: 8000
message:  
  greeting: Hello from the configuration

我做了幾次嘗試:

  1. 將AWS GIT憑證(不是AWS Secret key)放置在引導程序屬性中,但沒有結果。 例:

    spring.cloud.config.server.git。用戶名:sergio.greco-at-682088819034 spring.cloud.config.server.git.password:xxxxxxx

  2. 一旦啟動,將AWS Secret Key \\ Identity ID作為java參數放置,如下所示:

    -Daws.accessKeyId = xxxxxxxxYNOA -Daws.secretKey = xxxxxxxxxxxxxxxx

  3. 設置環境變量AWS_ACCESS_KEY_ID \\ AWS_SECRET_ACCESS_KEY。

有人能幫我嗎?

您需要在類路徑中具有AWS開發工具包。 相關文檔: http : //cloud.spring.io/spring-cloud-static/spring-cloud-config/1.3.1.RELEASE/

搜索“使用AWS CodeCommit進行身份驗證”。

注意:aws-java-sdk-core jar是可選的依賴項。 如果aws-java-sdk-core jar不在您的類路徑中,則無論git服務器URI如何,都不會創建AWS Code Commit憑證提供程序。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM