自签名 SSL 证书与 Windows Server 2012、Bonobo Git Server 一起使用 [英] Self Signed SSL Certificate Use With Windows Server 2012, Bonobo Git Server

查看:24
本文介绍了自签名 SSL 证书与 Windows Server 2012、Bonobo Git Server 一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用工作站上的 Aptana Studio 3 与托管在 Windows 2012 服务器上的 Bonobo Git 存储库进行通信.我遵循了无数关于创建自签名 SSL 证书的指南,使用开放的 ssl,但仍然无法连接到 Git 存储库.这是我遵循的步骤:

I'm attempting to communicate with my Bonobo Git repo hosted on a Windows 2012 server using Aptana Studio 3 on my Workstation. I have followed countless guides on creating self signed SSL certificates, using open ssl and still am not able to connect to the Git repo. Here's the steps I have followed:

  1. 在 Win2012 服务器中创建自签名 SSL 证书
  2. 将证书分配给 Bonobo Git 服务器的 https 绑定
  3. 在我的工作站上安装该证书
  4. 将证书放入我的 \Aptana Studio 3 Workspace.metadata.plugins\com.aptana.portablegit.win32\ssl\certs 文件夹
  5. 使用 http.sslCAinfo 将 Git 指向它

失败后,我尝试按照本指南创建自己的证书颁发机构,但无法找到一种方法来允许 Windows 2012 服务器实际使用它通过 Bonobo Git 服务器生成的任何证书绑定:

After that failed, I then attempted to follow this guide to create my own certificate authority, but wasn't able to find a way to allow the windows 2012 server to actually use any of the certs it generated with the Bonobo Git Server binding:

https://enterprise.github.com/help/文章/使用自签名 SSL 证书

我有一种感觉,我完全误解了自签名 SSL 证书,以及如何在我的服务器和访问它们的工作站上设置它们.无论我做什么,在尝试从 Git 执行推送时,我总是以以下错误告终:

I have a feeling that I am completely misunderstanding self signed SSL certificates, and how they should be setup on my server and on the workstations accessing them. No matter what I do, I always end up with the following error when attempting to execute push from Git:

错误:SSL 证书问题,请验证 CA 证书是否正常.细节:错误:14090086:SSL 例程:SSL3_GET_SERVER_CERTIFICATE:访问 https:xxx.xxx.xxx.xxx:xxxx 时证书验证失败

error: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https:xxx.xxx.xxx.xxx:xxxx

我真的很想知道如何创建自签名 SSL 证书,将其安装在 windows 2012 服务器上,将其设置为与 Bonobo Git 服务器绑定一起使用,并从我的工作站成功连接到 git 存储库.

I would really love to know exactly how I can create a self signed SSL certificate, install it on the windows 2012 server, set it to be used with the Bonobo Git Server binding, and successfully connect to the git repo from my Workstation.

推荐答案

最终想通了.

以及您遵循的建议,您还需要将其创建为 PFX,然后您可以将其导入 IIS 管理器(在您的服务器的根级别).此处的说明.

As well as the advice you followed, you also need to create as PFX that you can then import into IIS Manager (at the root level of your server). Instructions here.

总结

  1. 创建您的 CA 证书.
  2. 创建服务证书.注意:确保通用名称反映您的 BonoboGit 站点的域名.
  3. 生成 pfx.(来自我提供的链接,不要担心 -certfile 参数)
  4. 将此 pfx 复制到您的服务器
  5. 通过 IIS 管理器、服务器证书、导入 PFX,确保提供您在生成证书时提供的密码.
  6. 对于您的站点,将 443 的绑定更改为使用导入的 pfx(您应该会在列表中看到它)

工作完成.

哎呀差点忘了.然后你需要告诉 GIT 使用你的证书.

oops almost forgot. you then need to tell GIT to use your certificate.

git config --local http.sslCAInfo /path/to/your/cert/rootCA.crt

如果您尚未设置存储库,则需要先进行设置.

If you haven't already got a repository set up, you'll need to do so first.

cd mygitrepo
git init
git config --local http.sslCAInfo /path/to/your/cert/rootCA.crt
git remote add origin https://git.yourserver.com
git pull master

应该这样做.

这篇关于自签名 SSL 证书与 Windows Server 2012、Bonobo Git Server 一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆