您的位置:首页 > 编程语言 > Java开发

spring cloud config 配置自建git服务器

2016-08-23 19:24 861 查看
application.yml

server:
port: 8888

management:
context-path: /admin

logging:
level:
com.netflix.discovery: 'OFF'
org.springframework.cloud: 'DEBUG'

eureka:
instance:
leaseRenewalIntervalInSeconds: 10
statusPageUrlPath: /admin/info
healthCheckUrlPath: /admin/health
hostname: ${CF_INSTANCE_IP:localhost}
nonSecurePort: ${CF_INSTANCE_PORT:${PORT:${server.port:8888}}}
client:
serviceUrl:
defaultZone: ${EUREKA_SERVICE_URL:http://localhost:8761}/eureka/

spring:
cloud:
config:
server:
overrides:
eureka:
client:
serviceUrl:
defaultZone: ${EUREKA_SERVICE_URL:http://localhost:8761}/eureka/
instance:
hostname: $\{CF_INSTANCE_IP:localhost}
nonSecurePort: $\{CF_INSTANCE_PORT:$\{PORT:$\{server.port:8080}}}
git:
uri: <span style="color:#FF0000;">git@127.0.0.1:sample.git</span>
basedir: target/config

git.properties

git.commit.id.abbrev=92f2e9
git.commit.id=92f2e9e03a9409505ed770276e3f221162ce6633
git.commit.user.name=git
git.build.user.name=git
git.commit.id.describe=92f2e9
git.branch=master
git.remote.origin.url=git@127.0.0.1:sample.git

git服务器 /etc/ssh/sshd_config配置

<pre name="code" class="html">#添加算法
KexAlgorithms diffie-hellman-group1-sha1
KexAlgorithms diffie-hellman-group-exchange-sha1
#只保留rsa key
HostKey /etc/ssh/ssh_host_rsa_key
#开启证书登陆(参考ssh证书登陆)
RSAAuthentication yes
PubkeyAuthentication yes



客户端手动登陆一次,产生~/.ssh/known_hosts文件

使用git账户启动spring cloud config 服务器进程。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: