OpenMediaVault GitLab 安装
/**************************************************************************** * OpenMediaVault GitLab 安装 * 说明: * 安装过程中遇到各种各样的问题,尤其是在执行dpkg安装包的时候很久没反省, * 后来直接运行,放那里,吃饭去了,回来就好了。 * * 2016-8-17 深圳 南山平山村 曾剑锋 ***************************************************************************/ 一、参考文档: 1. Install a GitLab CE Omnibus package on https://about.gitlab.com/downloads/#ubuntu1404 2. APT/YUM repository for GitLab Community Edition packages https://packages.gitlab.com/gitlab/gitlab-ce 3. change the data directory gitlab to store repos elsewhere http://stackoverflow.com/questions/19902417/change-the-data-directory-gitlab-to-store-repos-elsewhere 4. Could not read from remote repository https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide 5. project ssh path is wrong https://github.com/gitlabhq/gitlabhq/issues/3686 6. GitLab搭建以及配置 http://www.jianshu.com/p/a22eaa1fcfe7 二、gitlab 安装: 1. sudo apt-get install curl openssh-server ca-certificates postfix 2. 按参考文档内网址获取安装包,这里也可以在Windows下载好,再FTP上传上去。 3. dpkg -i <包名> 4. sudo gitlab-ctl reconfigure 三、修改Web端口号及ip: 1. 修改/etc/gitlab/gitlab.rb ...... external_url 'http://192.168.1.4:8888' # 不这样修改,界面上有些内容用起来比较麻烦。 ...... 2. gitlab-ctrl start 3. gitlab-ctrl reconfigre # 在这之前一定要先运行gitlab-ctrl start,否则会出错 4. gitlab-ctrl top 5. gitlab-ctrl start 四、修改仓库目录: 1. rm /var/opt/gitlab/git-data/repositories 2. ln -s /home/git/repos /var/opt/gitlab/git-data/repositories 五、clone project: 1. http: git clone http://192.168.1.4:8888/<your username>/<your project name>.git 2. 如果ssh key,当然你要知道git账户密码: git clone git@192.168.1.4:git-data/repositories/<your username>/<your project name>.git 3. 如果已经在Web主页上添加了ssh key: git clone git@192.168.1.4:<your username>/<your project name>.git