Windows 下用 gogs 配置局域网 git server
Windows 下用 gogs 配置局域网 git server
最近要用 C# 开发一个新的项目,所以需要在 Windows 局域网环境下构建一个 git server。
在 Windows 7 上搭建 git server 的方案很多。比如:
1. gogs
2. bamboo(https://www.atlassian.com/software/bamboo/)
3. Github for Windows + CoqSSH(https://github.com/msysgit/msysgit/wiki/Setting-up-a-Git-server-on-Windows-using-Git-for-Windows-and-CopSSH)
git stash 太庞大,不做考证。
这里选 gogs 实现。
平台:Win7 x64
工具:nssm、gogs_v0.8.43_windows_amd64.zip、MySQL、git 工具
0. 安装 MySQL;
1. 在 MySQL 中创建 gogs 数据库:
create database gogs;
2. 安装 Git 工具。这一步是为了 gogs 服务端能够找到 git 命令。由于此前我在机器上已经安装了 Github for Windows 工具,所以 git 也附带的安装了。如果你的机器上没安装 git。可以去下载一个并安装。
3. 解压 gogs_v0.8.43_windows_amd64.zip 到目的位置;
4. 注册 gogs 服务:
(1) 修改 gogs/scripts/windows/install-as-service.bat,将其中的:
SET gogspath=C:/gogs
路径信息修改为本机 gogs 安装路径;
(2) 安装 nssm,并确保 nssm 的安装路径已添加到 %PATH% 环境变量中;
(3) 以管理员权限运行 install-as-service.bat;
5. 打开浏览器,输入:127.0.1.1:3000,进入配置界面(我只修改了代码仓库存放路径这一项)。完成配置后,gogs/custom/conf 目录下会生成一个新的 app.ini 配置文件。
6. 注册用户,登录用户。默认情况下,注册的第一个用户将具有管理员权限。
7. 在局域网情况下,Garvatar 不可用。所以用户最好设置一个自定义头像。
8. 在工作机器上安装一个 git 客户端工具。可选的带 GUI 的客户端工具有:
SourceTree
TortoiseGit
参考资料:
1. https://gogs.io/docs/installation/install_from_binary.html
2. https://gogs.io/docs/installation/configuration_and_run
3. https://gogs.io/docs/installation/run_as_windows_service
4. https://gogs.io/docs/advanced/configuration_cheat_sheet.html

Windows 下用 gogs 配置局域网 git server的更多相关文章
- Windows下安装 msysGit 以及初始化 Git server环境
Windows下git工具msysGit使用以及Git server初始化 Windows下git工具,这里选择msysGit,版本为msysGit-netinstall-1.8.1.2-previe ...
- 2分钟 windows下sublime text 3安装git插件:
12:35 2015/11/182分钟 windows下sublime text 3安装git插件:推荐博客:http://blog.csdn.net/naola2001/article/detail ...
- Windows下CVSNT安装配置
首先要说明:X64下安装此软件会报 “cvs [login aborted]: WIN-4H9CRJO1TRA\Administrator: Switch to user failed due to ...
- 基于svnserve的SVN服务器(windows下安装与配置)
基于svnserve的SVN服务器(windows下安装与配置) 基于svnserve的SVN服务器(windows下安装与配置)关键字: svn 安装SVNserve 从http://subvers ...
- Windows 下 MSYS2 环境配置和 MinGW-w64 C++ 环境配置
Windows 下 MSYS2 环境配置和 MinGW-w64 C++ 环境配置 1.简介 本文主要是 Windows 下 MSYS2 环境配置和 MinGW-w64 C++编译环境配置方法 2.下载 ...
- Windows下python的配置
Windows下python的配置 希望这是最后一次写关于python的配置博客了,已经被python的安装烦的不行了.一开始我希望安装python.手动配置pip并使用pip安装numpy,然而发现 ...
- Windows 下如何安装配置Snort视频教程
Windows 下如何安装配置Snort视频教程: 第一步: http://www.tudou.com/programs/view/UUbIQCng360/ 第二部: http://www.tudou ...
- PHP学习之-Mongodb在Windows下安装及配置
Mongodb在Windows下安装及配置 1.下载 下载地址:http://www.mongodb.org/ 建议下载zip版本. 2.安装 下载windows版本安装就和普通的软件一样,直接下一步 ...
- Windows下caffe的配置和调用caffe库(一)
一.Windows下caffe的配置: 1. 下载caffe官网提供的开发包,https://github.com/microsoft/caffe 2. 将caffe-master目录下的Window ...
随机推荐
- PHP统计字符串里单词查询关键字
<?function full_count_words($str) { //返回完整数组,包含字符串里每个单词 $words = str_word_count($str,1); ...
- top指令
top - :: up :, user, load average: 0.00, 0.01, 0.05 Tasks: total, running, sleeping, stopped, zombie ...
- mysql下面的INSTALL-BINARY的内容,所有的mysql的配置内容都在这
2.2 Installing MySQL on Unix/Linux Using Generic Binaries Oracle provides a set of binary distributi ...
- emacs notepad notepad++ 撤销比较
以前使用编辑器都是直接上手,未读过什么的文档了解.所谓撤销只是使用,也不了解究竟撤销到何处,阅读了emacs的文档才知道有许多区别呢. 输入this is a pen,然后一个个字符地删除到this ...
- storm在windows系统下安装调试
基础知识 Storm是一个分布式的,可靠的,容错的数据流处理系统.它会把工作任务委托给不同类型的组件,每个组件负责处理一项简单特定的任务.Storm集群的输入流由一个被称作spout的组件管理,spo ...
- 2016.07.08,英语,《Vocabulary Builder》Unit 24
mand/mend comes from mandare, Latin for 'entrust' or 'order'. command and commandment: [kə'mændmənt] ...
- Twitter Storm中Bolt消息传递路径之源码解读
本文初次发表于storm-cn的google groups中,现以blog的方式再次发表,表明本人徽沪一郎确实读过这些代码,:). Bolt作为task被executor执行,而executor是一个 ...
- IOS开发之开篇--CocoaPods安装
CocoaPods是什么?当你开发iOS应用时,会经常使用到很多第三方开源类库,比如JSONKit,AFNetWorking等等.可能某个类库又用到其他类库,所以要使用它,必须得另外下载其他类库,而其 ...
- mobile cpu上禁用alpha test的相关总结
因为,每家芯片的特性不同,根据向framebuffer写法的不同,分为tile-based的mobile cpu,如ImgTec PowerVR,ARM Mali,一部分老版本Qualcomm ...
- Tiffany
--名称:Tiffany&Co(蒂芙尼) --总部:美国,纽约 --历史:1837年创立 --产品:珠宝.手表. 配饰.礼品 --特点:品牌,质量,奢饰品