2017-08-04 51 views
0

我有一個Spring Cloud Config項目,我連接到我的github帳戶,我的項目工作正常,但在我的工作中,我的老闆想要創建一個git服務器並使用它而不是GitHub的帳戶,我的服務器上,以便安裝後的git(Linux操作系統,我創建了這樣一個信息庫:無法使用Spring雲配置從git服務器獲取信息

git init configuracionCarnet 

cd configuracionCarnet 

git pull <url from github> 

git remote add origin [email protected]:/home/desarrollo/configuracionCarnetDesarrollo.git 

在我的春節,雲配置的項目,我改變我的application.yml這樣的:

spring: 
    cloud: 
    config: 
     server: 
     git: 
      uri: [email protected]:/home/desarrollo/configuracionCarnet.git 
      username: user 
      password: password 
server: 
    port: 8001 

我運行該項目並開始正常,但是當我執行http://localhost:8001/health它拋出,該項目是下跌,所以我無法連接到GIT服務器,我在做什麼錯?

在此先感謝

+0

請參閱[Git on the Server](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols)(以及下面的部分)瞭解簡介設置您自己的服務器。 –

回答

0

你不…remote add…創建服務器。

你也不會在你的配置文件中加入一個不存在的URL來創建你的Spring配置服務器。

可能性:

  1. 隱藏的GitHub與Spring把你的GitHub網址在Spring的配置,像之前。
  2. 用Gitblit鏡像隱藏GitHub(你必須安裝Gitblit和google一下)
  3. 使用Gitblit作爲GitHub的替代品。