今天在公司使用spring cloud config搭建配置中心的时候,出现了读取不到git库的问题:Cannot clone or checkout repository。在网上百度,前面几个答案都是在spring.cloud.config.server.git.uri的值后面加上.git,这个明显是不对的,而且后面我也验证了,这个在2.0.0的spring cloud上是不存在的,如果出现了这个问题,肯定是用了早期版本的spring cloud。

  后面突然想到,我们公司走外网是要通过代理服务器的,肯定是网络不通导致拉取不到文件。于是参考官方文档添加了代理配置,就能够正常拉取了。

  官网地址:http://cloud.spring.io/spring-cloud-config/single/spring-cloud-config.html

  

  注意,这个地方的port,官网上加上了单引号,这个应该是官网上写错了,加上不能正常使用。

网络原因导致的 spring cloud config 读取git上的配置文件时报错:Cannot clone or checkout repository的更多相关文章

  1. SpringCloud实战之初级入门(三)— spring cloud config搭建git配置中心

    目录 1.环境介绍 2.配置中心 2.1 创建工程 2.2 修改配置文件 2.3 在github中加入配置文件 2.3 修改启动文件 3. 访问配置中心 1.环境介绍 上一篇文章中,我们介绍了如何利用 ...

  2. spring cloud config center Git SSH configuration

    Git SSH configuration using properties By default, the JGit library used by Spring Cloud Config Serv ...

  3. Spring Cloud Config采用Git存储时两种常用的配置策略

    由于Spring Cloud Config默认采用了Git存储,相信很多团队在使用Spring Cloud的配置中心时也会采用这样的策略.即便大家都使用了Git存储,可能还有各种不同的配置方式,本文就 ...

  4. Spring Cloud Config配置git私钥出错

    重装了电脑之后,重新生成了ssh key文件id_rsa和id_rsa.pub文件. 然后在配置中心的配置了私钥之后启动项目,报错如下: Reason: Property 'spring.cloud. ...

  5. spring cloud --- config 从git 获取文件【 可能是yml或 properties】遇到有相同字段的取值规则

    spring boot      1.5.9.RELEASE spring cloud    Dalston.SR1 1.前言 昨天做了 spring cloud config 配置中心 获取存在gi ...

  6. spring cloud config 连接GitHub访问 报错 Cannot clone or checkout repository

    原因是建立仓库的时候将仓库私有化了,将仓库公有 或者 设置账号密码即可!

  7. Spring Cloud搭建手册(2)——Spring Cloud Config

    ※在Dalston.SR2版本以后,均不能正常加密,如果必须使用此功能,需要降级到SR1或Camden SR7. 1.首先需要创建一个config-server工程,作为配置中心的服务器,用来与git ...

  8. SpringCloud学习笔记(7):使用Spring Cloud Config配置中心

    简介 Spring Cloud Config为分布式系统中的外部化配置提供了服务器端和客户端支持,服务器端统一管理所有配置文件,客户端在启动时从服务端获取配置信息.服务器端有多种配置方式,如将配置文件 ...

  9. Spring Cloud Config中文文档

    https://springcloud.cc/spring-cloud-config.html 目录 快速开始 客户端使用 Spring Cloud Config服务器 环境库 健康指标 安全 加密和 ...

随机推荐

  1. 如何让写得html页面自动刷新

    一:新建一个文件夹用vscode打开 二:终端输入npm init 然后一路回车会在文件夹中生成一个package.json文件 三:新建个html,在终端中输入cnpm install -g liv ...

  2. Venom- Eminem

    I got a song filled with shit for the strong willed. 我写了一首充满戾气的歌献给意志坚强的人. When the world give you a ...

  3. 弹筐里同一个按钮判断是从哪里点击过来的form

    点击弹框按钮 <form action="javascript:;" method="post">         <button type= ...

  4. C# 关键字new用法

    1.实例化对象,执行构造函数. public class Test { public Test(string name) { Console.WriteLine(name); } } public c ...

  5. 【Mybatis】【3】mybatis Example Criteria like 模糊查询

    正文: 在Java中使用Mybatis自动生成的方法,like需要自己写通配符 public List<TableA> query(String name) { Example examp ...

  6. web前端bug积累

    在将img转换为canvas时,在firefox中,如果img引用的svg使用了fill=(#id),此fill是无效的,可能导致整个转换失效,html2canvas.js也不行.chrome有效,其 ...

  7. rpm -ivh 安装与 rpm -U安装解决问题一例

    [root@localhost server3.10.12]# rpm  -ivh krb5-libs-1.15.1-18.el7.x86_64.rpm警告:krb5-libs-1.15.1-18.e ...

  8. angular6 aot 预先编译

    angular.json文件:(红色加粗部分) { "$schema": "./node_modules/@angular/cli/lib/config/schema.j ...

  9. python3安装docx模块出现Import Error: No module named 'exceptions'

    x首先 pip3 install docx 显示已经安装,但是 No module named 'exceptions' 网上查的资料命令行下载的docx安装包还没有完全兼容python3,第三方库应 ...

  10. python之路-格式化输出、编码

    格式化输出 user = input('Username:') pwd = input('Password:') msg = 'your username:%s,your password:%d,10 ...