2017-08-04 125 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的替代品。