Git Server Frustration (Gitosis, Gitolite, etc)

后端 未结 6 684
生来不讨喜
生来不讨喜 2021-01-31 20:15

Please excuse the frustrating undertones as I have attempted to get this set up correctly multiple times to no avail (possibly and most likely due to my ignorance, but also

相关标签:
6条回答
  • 2021-01-31 20:42

    A couple of pointers:

    The section about git on the server on Scott Chacon's pro git book

    Gitorious is FOSS

    0 讨论(0)
  • 2021-01-31 20:42

    I think the problem is that you ssh client (windows or linux version) is not finding the key file. I had the same problem and solved this way:

    • In my notebook, generated the key file (rafael.nicoletti@mycorporation) in ~/.ssh folder (where ~ is home folder. windows version is %HOME% env)
    • I added a file name config in ~/.ssh with following content:

      IdentityFile ~/.ssh/rafael.nicoletti@corporation

    In every location i want to access my git servers, i just copy those files in my %HOME% folder

    You can also put the some things like this in config file:

    IdentityFile /d/identity.key
    IdentityFile /e/identity.key
    IdentityFile /f/identity.key
    IdentityFile /.../identity.key
    

    So the config will look for keys in removable medias.

    0 讨论(0)
  • 2021-01-31 20:44

    i am using debian with every developer having an account on the server. i use ssh with private key login. Finally a developer has to use a url like ssh://username@example.com/git-repo/repo.git to checkout or in any case interact with git on repo

    0 讨论(0)
  • 2021-01-31 20:48

    From my experience, all you need is a SSH server with a single git account/login that you are able to connect to using one of your public keys. Install gitolite using SSH (copies gitloite from your client to the server & does the basic setup) and have your developers send you their public keys. Add these keys to the gitolite-admin repository in your ~ and push.

    Why does a developer need more than one keypair in the first place, even if multiple machines are used? Such cases will neither influence how SSH handles authentication nor how gitolite handles authorization: they're still SSH keys.

    • If a developer has to use several keypairs (one for git, another for some other server), let them handle the complexity and advise them to create an entry in ~/.ssh/config for each keypair/server combination they use.

    • If a developer has a different keypair on every machine used, gitolite groups can combine several public keys:

    @agross = agross-1 agross-2
    
    0 讨论(0)
  • 2021-01-31 20:49

    There are a few open source git hosting solutions with a web-based UI for creating repositories and adding users (like GitHub:FI)... though I don't know about restricting access:

    • Gitorious (Ruby)
    • InDefero (PHP)
    • Girocco (Perl, shell scripts)

    HTH

    0 讨论(0)
  • 2021-01-31 20:56

    I maintain a gitosis config at work, and when a developer has multiple ssh keys, all I have to do is put all these keys in the same keydir/user.pub file.

    So concatenate all your keys into keydir/benny.pub and you shoud be all set.

    0 讨论(0)
提交回复
热议问题