gitolite

Linux系统搭建并管理Git服务器

[亡魂溺海] 提交于 2019-12-01 19:30:13
搭建Git服务器 GitHub就是一个免费托管开源代码的远程仓库。但是对于某些视源代码如生命的商业公司来说,既不想公开源代码,又舍不得给GitHub交保护费,那就只能自己搭建一台Git服务器作为私有仓库使用。 搭建Git服务器需要准备一台运行Linux的机器,强烈推荐用Ubuntu或Debian,这样,通过几条简单的apt命令就可以完成安装。 假设你已经有sudo权限的用户账号,下面,正式开始安装。 第一步,安装git: $ sudo apt-get install git 第二步,创建一个git用户,用来运行git服务: $ sudo adduser git 第三步,创建证书登录: 收集所有需要登录的用户的公钥,就是他们自己的id_rsa.pub文件,把所有公钥导入到/home/git/.ssh/authorized_keys文件里,一行一个。 第四步,初始化Git仓库: 先选定一个目录作为Git仓库,假定是/srv/sample.git,在/srv目录下输入命令: $ sudo git init --bare sample.git Git就会创建一个裸仓库,裸仓库没有工作区,因为服务器上的Git仓库纯粹是为了共享,所以不让用户直接登录到服务器上去改工作区,并且服务器上的Git仓库通常都以.git结尾。然后,把owner改为git: $ sudo chown -R git:git

Gitolite prompts for password only on central server with SSH registered

三世轮回 提交于 2019-12-01 12:17:22
I am running gitlab which uses gitolite on a central repository Ubuntu machine and have several users that connect to this machine after adding their public SSH keys via Gitlab's web interface. The different users on their own machines can successfully push and pull from the central repository machine just fine. On the machine itself, I cannot have my user push or pull to the central repository. It always asks for git's password! How can I fix this? On a remote machine with SSH key registered I get: myusername@ubuntu:~$ ssh -T git@111.222.333.444 hello my_username_gmail_com_1348772800, this is

gitolite permissoins with branches and folders

感情迁移 提交于 2019-12-01 12:14:33
In gitolite I want the @developers to be able to push to any branch except for master . I want user1 to be able to push to any branch (including master ) except not a certain directory on master . How would I do that? VonC This should address both: repo arepo RW = @developer - master$ = @developer RW = user1 - master and VREF/NAME/adirectory = user1 The access rules and refex pages explain how /refs/head/master branch is denied for push for @developer. The Virtual Refs ' NAME ' allows you to deny push for a given directory or file. The Drew Lesueur adds in the comments : - master VREF/NAME

Error of setup public key for gitolite on ubuntu 12.04 server

孤者浪人 提交于 2019-12-01 11:40:19
问题 We follow the post (http://www.bigfastblog.com/gitolite-installation-step-by-step) to install gitolite on ubuntu 12.04 server. When doing /home/git/bin/gitolite setup -pk west_org_selfgen.pub, there is an error: $/home/git/bin/gitolite setup -pk west_org_selfgen.pub FATAL: errors found but logfile could not be created FATAL: /home/git/.gitolite/logs/gitolite-2013-09.log: No such file or directory FATAL: die 'west_org_selfgen.pub' not a readable file There are multiple lines in our public key

Can not add user with Gitolite (centos)

不想你离开。 提交于 2019-12-01 10:49:14
I am newby with gitolite. I've install gitolite on a remote server(192.168.1.109) So I could git-cloning gitolite-admin.git. git clone ssh://git@192.168.1.109/gitolite-admin.git wanted to add user and repo using gitolite. following is ordinary add user process. ssh-keygen -t rsa -C "test" -f test added the public key in keydir/test.pub and then, git add / git commit / git push is done well, GitServer echo msg for git push is: Total 5 (delta 0), reused 0 (delta 0) remote: keydir/test.pub: Permission denied remote: FATAL: fingerprinting failed for 'keydir/test.pub' To ssh://git@192.168.1.109

Multiple gitolite users on one machine

半世苍凉 提交于 2019-12-01 10:41:59
问题 I've set up gitolite on a remote machine and configured it from my local. I didn't want to have my activity shown as "admin" and created the user and key "noah". After creating a repo for "noah", I was denied access. I believe because I was still "admin". So I have two accounts on one machine. How do I switch? Thanks UPDATE: Here is my local ~/.ssh/config/: #noah account Host git-noah HostName remote User git IdentityFile ~/.ssh/noah</code> command on local: git clone git-noah@remote-ip

Gitolite error .gitolite.rc' seems to be for older gitolite; please see doc/g2migr.mkd

血红的双手。 提交于 2019-12-01 10:39:49
I have installed gitolite using rpm in centos6 ie gitolite-2.3.1-1.el6.noarch.rpm and after rpm installation I have run the gl-setup . I am trying to access repo over http. When I try to clone git clone http://server.name/git/gitoliteadmin.git it gives error: FATAL: '/var/opt/jet/gitolite/.gitolite.rc' seems to be for older gitolite; please see doc/g2migr.mkd (online at http://gitolite.com/gitolite/g2migr.html) Premature end of script headers: gitolite-shell Below is my htpd.conf configuration <VirtualHost 10.111.123.17:80> ServerName server.name LogLevel Debug SetEnv GIT_HTTP_EXPORT_ALL

Can not add user with Gitolite (centos)

依然范特西╮ 提交于 2019-12-01 09:41:42
问题 I am newby with gitolite. I've install gitolite on a remote server(192.168.1.109) So I could git-cloning gitolite-admin.git. git clone ssh://git@192.168.1.109/gitolite-admin.git wanted to add user and repo using gitolite. following is ordinary add user process. ssh-keygen -t rsa -C "test" -f test added the public key in keydir/test.pub and then, git add / git commit / git push is done well, GitServer echo msg for git push is: Total 5 (delta 0), reused 0 (delta 0) remote: keydir/test.pub:

post-receive hook permission denied “unable to create file” error

最后都变了- 提交于 2019-12-01 09:35:32
Just got gitolite installed on my webserver and am trying to get a post-receive hook that can point the git dir in apache's direction. This is what my post-receive hook looks like. Got this script from the Using Git to manage a web site . #!/bin/sh echo "post-receive example.com triggered" GIT_WORK_TREE=/srv/sites/example.com/public git checkout -f I've also tried: #!/bin/sh echo "post-receive example.com triggered" unset GIT_INDEX_FILE export GIT_WORK_TREE=/srv/sites/example.com/public export GIT_DIR=/home/git/repositories/example.com.git git checkout -f This is the error response i'm getting

post-receive hook permission denied “unable to create file” error

Deadly 提交于 2019-12-01 09:27:55
问题 Just got gitolite installed on my webserver and am trying to get a post-receive hook that can point the git dir in apache's direction. This is what my post-receive hook looks like. Got this script from the Using Git to manage a web site. #!/bin/sh echo "post-receive example.com triggered" GIT_WORK_TREE=/srv/sites/example.com/public git checkout -f I've also tried: #!/bin/sh echo "post-receive example.com triggered" unset GIT_INDEX_FILE export GIT_WORK_TREE=/srv/sites/example.com/public export