W登录gitolite-admin拒绝给用户 [英] W access for gitolite-admin DENIED to user

查看:81
本文介绍了W登录gitolite-admin拒绝给用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力让gitolite工作。我使用了软件包方法,并且能够与第一个用户进行第一次git推送。之后,如果我添加一个密钥并尝试再次推送某些内容,则会出现一条错误消息,提示Wit access for gitolite-admin Denied to mike - 请注意,它应该使用gitolite用户 - 而不是我的用户名。我想这是因为我在.bash_profile中为两个用户添加了私钥。 (我使用的是msysgit)...



任何想法?



非常感谢!

解决方案


我想这是因为我为两个用户添加私钥


确实,您应该为 gitolite 用户使用专用的公钥/私钥,这也是用于ssh访问。

您可以通过查看gitolite日志(〜gitolite / .gitolite / logs )来确认它。

使用多个键通过 config 文件完成。

请参阅用户在使用gitolite时被要求输入密码

%HOME%/。ssh / config 文件可能包含以下内容:

  HostName gitoliteserver 
用户gitolite
IdentityFile〜/ .ssh / gitolite

主机mikegito lite
HostName gitoliteserver
用户mike
IdentityFile〜/ .ssh / id_rsa

不要忘记定义 HOME 是否在Windows上:默认情况下没有定义)



< hr>

OP Mike Gagnon 确认在评论下面的配置工作:

 主机gitolite 
用户gitolite
主机名myhost
端口443
IdentityFile〜/ .ssh / gitolite

主机edison
用户gitolite
主机名myhost
端口443
IdentityFile〜/ .ssh / mike


I've been trying very hard to get gitolite working. I used the package approach and am able to do a first "git push" with a first user to the server. After that, if if I add a key and try to push something again, I get an error saying "W access for gitolite-admin DENIED to mike"- note that it's supposed to be using the gitolite user- not my username. I guess this is because I'm adding private keys for both users in my .bash_profile. (I'm using msysgit)...

Any ideas?

Thanks a lot!

解决方案

I guess this is because I'm adding private keys for both users

True, you should use a dedicated public/private key for the gitolite user, the one which is also used for ssh access.
You can confirm it by looking in the gitolite logs (in ~gitolite/.gitolite/logs)

Using multiple keys is done through a config file.
See as an example "users are asked for password while using gitolite".
The %HOME%/.ssh/config file could contain something like:

HostName gitoliteserver 
    User gitolite
    IdentityFile ~/.ssh/gitolite

Host mikegitolite
    HostName gitoliteserver 
    User mike 
    IdentityFile ~/.ssh/id_rsa

Don't forget to define HOME is you are on Windows: it isn't defined by default)


The OP Mike Gagnon confirms in the comments the following config is working:

host gitolite 
user gitolite 
hostname myhost 
port 443 
IdentityFile ~/.ssh/gitolite

host edison 
user gitolite 
hostname myhost 
port 443 
IdentityFile ~/.ssh/mike

这篇关于W登录gitolite-admin拒绝给用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆