W access for gitolite-admin DENIED to user

前端 未结 2 1982
日久生厌
日久生厌 2020-12-19 10:47

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

2条回答
  •  难免孤独
    2020-12-19 10:53

    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
    

提交回复
热议问题