windows下安装gogs
2017-02-06 18:11
204 查看
关于gogs
能够项github一样的创建仓库做团队协助。对比了几个git-server。 gitlab gogs gitblit这几个工具。
gogs最适合。国人开发功能齐全。最关键的是跨平台。github上开源。golang编写。
工具软件准备
https://github.com/gogits/gogs/releases 下载windows_amd64.ziphttp://nssm.cc/download 下载 nssm
https://git-for-windows.github.io/ 下载msggit
https://tortoisegit.org/ 下载tortoisegit
gogit 类似github的工具
nssm 是为了gogit能够以windows服务已经运行
msgit 和小乌龟是git的客户端。
服务端搭建
nssm工具
nssm工具目录添加环境变量。其主要的命令如下:nssm install servername 安装 nssm remove servername 移除 nssm start servername 开启 nssm stop servermame 停止 nssm restart servername 重启 nssm status servername 状态
具体的使用方法:http://nssm.cc/usage
安装gogs
编辑运行脚本脚本如下:
script/window/install-as-service.bat
@ECHO off :: This script relies on nssm.exe to work. :: Please, download it and make it available on the system path, :: or copy it to the gogs path. :: https://nssm.cc/download :: This script itself should run in the gogs path, too. :: In case of startup failure, please read carefully the log file. :: Make sure Gogs work running manually with "gogs web" before running :: this script. :: And, please, read carefully the installation docs first: :: http://gogs.io/docs/installation :: To unistall the service, run "nssm remove gogs" and restart Windows. :: Set the folder where you extracted Gogs. Omit the last slash. SET gogspath=C:\Users\Administrator\Desktop\git-server\gogs nssm install gogs "%gogspath%\gogs.exe" nssm set gogs AppParameters "web" nssm set gogs Description "A painless self-hosted Git service." nssm set gogs DisplayName "Gogs - Go Git Service" nssm set gogs Start SERVICE_DELAYED_AUTO_START nssm set gogs AppStdout "%gogspath%\gogs.log" nssm start gogs pause
修改gogspath,这个是gogs解压后的目录(gogs.exe所在目录)。
2. 管理员身份执行脚本
脚本提示成功就ok了,如果提示失败。根据提示处理就ok。
无非是
nssm remove gogs重新来一遍。
3. 执行gogs安装。
http://137.0.0.1:3000 进入后进行一系列的配置。
主要就是数据库和管理员两项配置。 快速使用的话建议使用sqllite。
4. 打开网址注册一个账号
5. 添加一个仓库
创建一个个人仓库或者创建组织在组织下添加一个仓库。组织是为了工号的授权管理。
6. 正常情况下重启电脑后gogs会自动运行。
经过以上的步骤一个git server算是完成了。gogs的使用帮助 https://gogs.io/
安装git客户端
安装msggit注意的点就是勾选中windows cmd设置,使用windows的console.
安装tortoisegit
注意的点是使用ssh方式选项和几个cmd添加选项。正常情况下安装完成之后就让你填写一个用户名密码。就填写在gogs上注册的用户名和密码。
使用仓库
先用http的方式吧。git clone http://xxxxxxx (gogs上仓库地址)
记下来就一些使用的问题。
常见问题
gogs 使用ssh方式clone主要问题是windows ssh server很不好用。我选择http.
如何使用ssh
https://discuss.gogs.io/t/how-to-config-ssh-settings/34
添加秘钥的时候注意一个点就是里面不能存在换行。
相关文章推荐
- Git服务器Gogs简易安装-Windows环境
- Git服务器Gogs简易安装-Windows环境
- 在windows下安装gogs
- Windows 下安装maven
- ArcIMS4.0 for windows IIS + ServletsExec安装全记录(3)
- MySQL安装指南(Windows平台)
- 在Windows 2003下安装Portal一记
- ArcIMS4.0 for windows IIS + ServletsExec安装全记录(2)
- 在 Windows 2000 下以 Apache 模块方式安装 PHP 4.1.1
- 在Windows和VC++6.0下的ACE安装手册
- 别人写的关于在Windows下安装BugZilla的说明,不错,值得借鉴
- windows下TOMCAT的安装
- 用于 IT 专业人员和开发人员的 Windows XP Service Pack 2 网络安装软件包
- 在Windows平台上安装SGI版的OpenGL
- PyGTK在Windows下的安装(作者:limodou 本文转自linuxforum )
- PHP安装指南(Windows平台)
- ArcIMS4.0 for windows IIS + ServletsExec安装全记录(1)
- 安装Localized Emulation Images for Windows Mobile
- 专题:Windows 到 Linux 之旅:第 9 部分. 安装软件