我用的是 SourceTree 作为Git客户端的,用它连接一个HTTPS证书过期的自建git服务,会收到下面错误:

abort: error: _ssl.c:507: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
fatal: repository 'https://****/guohongjun/mytest/' not found
Error validating server certificate for 'https://****:443':
- The certificate is not issued by a trusted authority. Use the fingerprint to validate the certificate manually!
- The certificate hostname does not match.
- The certificate has expired.
Certificate information:
- Hostname: *****
- Valid: from Thu, 12 Sep 2013 01:59:22 GMT until Fri, 12 Sep 2014 01:59:22 GMT
- Issuer: http://certs.godaddy.com/repository/, GoDaddy.com, Inc., Scottsdale, Arizona, US
- Fingerprint: a4:e0:66:ca:ba*******
(R)eject, accept (t)emporarily or accept (p)ermanently? svn: E175002: Unable to connect to a repository at URL 'https://******/guohongjun/mytest'
svn: E175002: OPTIONS of 'https://*****/guohongjun/mytest': Server certificate verification failed: certificate has expired, certificate issued for a different hostname, issuer is not trusted (https://*****)

这是因为 SourceTree 新建仓库时,在 从URL 克隆时, 会去校验 ssl,如下图:

就是你在设置中设置了“禁止SSL校验也不行”

解决方案, 用命令行 clone 项目,然后通过添加已存在的本地仓库来使用。

Git 全局设置

git config --global user.name "郭红俊"
git config --global user.email guohongjun@***。**

创建仓库,并更新到远程服务器

mkdir mytest01
cd mytest01
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin http://*****/guohongjun/mytest01.git
git push -u origin master

Existing Git Repo   存在本地 Git Repo

cd existing_git_repo
git remote add origin http://118.194.63.8/guohongjun/mytest01.git
git push -u origin master
 
在做远程服务器提交之前,需要执行下面命令,禁用SSL校验

git config --global http.sslVerify false

准备好本地库相关

提交到远程服务器

这时候,我们通过 新仓库 - 新建本地已经存在的仓库 方式就可以增加了。

最新文章

  1. 微信在IOS7下无法分享图片
  2. ppt 数组课后作业
  3. 数字信号处理--FFT
  4. Asp.Net MVC4入门指南(10):第三方控件Studio for ASP.NET Wijmo MVC4 工具应用
  5. 随笔 JS 字符串 分割成字符串数组 并动态添加到指定ID的DOM 里
  6. CSS3:过渡大全
  7. Windows平台下Python2.7中pip的安装方法
  8. bzoj2326: [HNOI2011]数学作业
  9. [转]关于strtok和strtok_r函数的深度研究
  10. -_-#【userAgent】极速模式与非极速模式存在差异
  11. shell读取文件的每一行
  12. FPGA在电平接口领域的应用
  13. clumsy模拟客户端网络差的场景的使用
  14. hdu 5015(矩阵快速幂z )
  15. Spring注入对象(3)
  16. 开源顶级持久层框架——mybatis(ibatis)——day01
  17. C# 一般处理程序ashx接收服务端post过来json数据
  18. spring cloud使用Feign做消费端时的eureka.client.registerWithEureka/eureka.client.fetchRegistry是否配置的问题
  19. 记录一次spark连接mysql遇到的问题
  20. WampServer自己DIY添加apache、php、mysql版本

热门文章

  1. 枚举类型内部函数 enumerate
  2. Python的hasattr() getattr() setattr() 函数使用方法
  3. java解压缩.gz .zip .tar.gz等格式的压缩包方法总结
  4. 小div在大div里面水平垂直都居中的实现方法
  5. Storm系列二: Storm拓扑设计
  6. 【PKUSC2018】【loj6433】最大前缀和 状压dp
  7. 放弃jQuery,使用原生js吧!
  8. SpringMVC3.2+Spring3.2+Mybatis3.1(SSM~Demo)
  9. 如何在Mac OS中安装 wget
  10. 忘记mysql密码的解决办法--针对windows系统