在windows2019利用Bonobo Git Server搭建Git服务器

it2026-08-10  10

1.准备软件包

Git客户端:https://git-scm.com/downloads

                为了方便可以再下载一个GUI:这里选了,其它的也可以。Sourcetree,下载地址:https://www.sourcetreeapp.com Git服务器:Bonobo Git Server,下载地址:https://bonobogitserver.com

2、安装IIS的服务环境

如果之前安装过,请忽略...

添加角色功能

选择安装IIS服务

下一步后,选安装.net framework4.7和可承截Web核心,选好后点安装,要等一段时间后即能安装。

给IIS注册.Net Framework,管理员权限运行cmd,执行以下命令:

dism /online /enable-feature /featurename:IIS-ASPNET45 /all

3、配置网站

解压下载的Bonobo Git Server包,放到一个目录,我这里放到d盘的根目录,为了方便,目录名取为git.

开始-->Windows管理工具-->打开IIS管理器

先把默认的网站停止

右键点网站-->添加网站

填好网站名称,选刚解压的物理路径,其它默认即可。

本地浏览器输入localhost即可打开,其它电脑输服务器IP地址打开

初始用户名密码均为admin

进去后在setting可设置为中文。嗯。还是中文看的舒服。

4、客户端安装

git安装简单,基本一路下一步即可

Sourcetree跳过注册

一开始有git命令行不熟练,那么可以尝试使用sourcetree进行操作,Sourcetree是一个不错的Git客户端,但是安装的时候需要注册,有点麻烦。  当安装时提示你注册的时候 跳过注册开始了  将下面的一串串放进我的电脑的地址栏,打开sourcetree的文件夹.

%LocalAppData%\Atlassian\SourceTree\  接下来你应该在当前文件夹下创建一个json文件,文件名为accounts.json  然后,编辑此文件的内容如下

[ { "$id": "1", "$type": "SourceTree.Api.Host.Identity.Model.IdentityAccount, SourceTree.Api.Host.Identity", "Authenticate": true, "HostInstance": { "$id": "2", "$type": "SourceTree.Host.Atlassianaccount.AtlassianAccountInstance, SourceTree.Host.AtlassianAccount", "Host": { "$id": "3", "$type": "SourceTree.Host.Atlassianaccount.AtlassianAccountHost, SourceTree.Host.AtlassianAccount", "Id": "atlassian account" }, "BaseUrl": "https://id.atlassian.com/" }, "Credentials": { "$id": "4", "$type": "SourceTree.Model.BasicAuthCredentials, SourceTree.Api.Account", "Username": "", "Email": null }, "IsDefault": false } ]

保存此文件。

重新启动sourcetree,恩,和之前不一样的界面,无需注册,就是这样,sourcetree已经跳过注册环节。

 

最新回复(0)