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

 
 
 
http://www.cnblogs.com/myd7349/p/5233694.html

Windows 下用 gogs 配置局域网 git server的更多相关文章

  1. Windows下安装 msysGit 以及初始化 Git server环境

    Windows下git工具msysGit使用以及Git server初始化 Windows下git工具,这里选择msysGit,版本为msysGit-netinstall-1.8.1.2-previe ...

  2. 2分钟 windows下sublime text 3安装git插件:

    12:35 2015/11/182分钟 windows下sublime text 3安装git插件:推荐博客:http://blog.csdn.net/naola2001/article/detail ...

  3. Windows下CVSNT安装配置

    首先要说明:X64下安装此软件会报 “cvs [login aborted]: WIN-4H9CRJO1TRA\Administrator: Switch to user failed due to  ...

  4. 基于svnserve的SVN服务器(windows下安装与配置)

    基于svnserve的SVN服务器(windows下安装与配置) 基于svnserve的SVN服务器(windows下安装与配置)关键字: svn 安装SVNserve 从http://subvers ...

  5. Windows 下 MSYS2 环境配置和 MinGW-w64 C++ 环境配置

    Windows 下 MSYS2 环境配置和 MinGW-w64 C++ 环境配置 1.简介 本文主要是 Windows 下 MSYS2 环境配置和 MinGW-w64 C++编译环境配置方法 2.下载 ...

  6. Windows下python的配置

    Windows下python的配置 希望这是最后一次写关于python的配置博客了,已经被python的安装烦的不行了.一开始我希望安装python.手动配置pip并使用pip安装numpy,然而发现 ...

  7. Windows 下如何安装配置Snort视频教程

    Windows 下如何安装配置Snort视频教程: 第一步: http://www.tudou.com/programs/view/UUbIQCng360/ 第二部: http://www.tudou ...

  8. PHP学习之-Mongodb在Windows下安装及配置

    Mongodb在Windows下安装及配置 1.下载 下载地址:http://www.mongodb.org/ 建议下载zip版本. 2.安装 下载windows版本安装就和普通的软件一样,直接下一步 ...

  9. Windows下caffe的配置和调用caffe库(一)

    一.Windows下caffe的配置: 1. 下载caffe官网提供的开发包,https://github.com/microsoft/caffe 2. 将caffe-master目录下的Window ...

随机推荐

  1. 5. Configure the Image Service

    Controller Node: 1. sudo apt-get install glance python-glanceclient   2. sudo vi /etc/glance/glance- ...

  2. Ajax解决IE浏览器兼容问题

    ServletContext 被 Servlet 程序用来与 Web 容器通信.例如写日志,转发请求.每一个 Web 应用程序含有一个Context,被Web应用内的各个程序共享. 因为Context ...

  3. Angualar:指令大全

    指令: 内置渲染指令 内置事件指令 内置节点指令 自定义指令 restrict template replace属性 templateUrl属性 trnsclude priorty terminal属 ...

  4. Rails--bundle exec rake db:migrate

    --新建表: def up create_table :[TABLE_NAME] do |t| t.column :[NUM], :integer t.column :[NAME], :string ...

  5. MZhong's Cover Letter

    Application for front-end developer position in Chicago Office Dear HR, I am writing to apply for th ...

  6. convert from base 10 to base 2

    COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION Hence, we convert fro ...

  7. Segmentation

    COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION There is another way ...

  8. w win cmd VS broswer

    php -f Fetch data from db , use php without any bugs to analyse the data and read and write db, with ...

  9. [收藏]ASP.NET MVC管道详述

    ASP.NET MVC从诞生到现在已经好几个年头了,这个框架提供一种全新的开发模式,更符合web开发本质.你可以很好的使用以及个性化和扩展这个框架,但这需要你对它有足够的了解.这篇文章主要从整体角度总 ...

  10. Sandbox 文件存放规则

    文档1, document2,  document3 一.文件路径介绍 <Application_Home>/AppName.app : 1) This is the bundle dir ...