| 1 | package Git::Server; | ||
| 2 | |||
| 3 | 1 | our $VERSION = "0.048"; | |
| 4 | |||
| 5 | 1 | 1; | |
| 6 | |||
| 7 | =pod | ||
| 8 | |||
| 9 | =head1 NAME | ||
| 10 | |||
| 11 | Git::Server - Secure Git Server with more granular hooks capabilities than default git. | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | This is intented to be a drop-in replacement for any standard git server, | ||
| 16 | but provides more powerful server hooks and ACLs. | ||
| 17 | |||
| 18 | =head1 SYNOPSIS | ||
| 19 | |||
| 20 | If you do not already have a git server or git repo ready, then make one: | ||
| 21 | |||
| 22 | [admin@git-host ~]$ sudo useradd git | ||
| 23 | [admin@git-host ~]$ sudo su - git -c 'git init --initial-branch=main --bare projectx' | ||
| 24 | Initialized empty Git repository in /home/git/projectx/ | ||
| 25 | [admin@git-host ~]$ | ||
| 26 | |||
| 27 | Put something like the following in its ~git/.ssh/authorized_keys: | ||
| 28 | |||
| 29 | command="git-server REMOTE_USER=user1" ssh-ed25519 AAAA_OAX+blah_pub__ user1@dev | ||
| 30 | |||
| 31 | Then the first authorized user to touch the repo should have full access: | ||
| 32 | |||
| 33 | [user1@dev ~]$ git config --global user.name 'Mr Developer User1' | ||
| 34 | [user1@dev ~]$ git config --global user.email user1@dev.com | ||
| 35 | [user1@dev ~]$ git clone ssh://git@git-host/projectx | ||
| 36 | [user1@dev ~]$ cd projectx | ||
| 37 | [user1@dev projectx]$ echo 'Hello world' >> README | ||
| 38 | [user1@dev projectx]$ git add README | ||
| 39 | [user1@dev projectx]$ git commit -m 'First commit' README | ||
| 40 | [user1@dev projectx]$ git push --set-upstream origin main | ||
| 41 | [user1@dev projectx]$ | ||
| 42 | |||
| 43 | See INSTALL.md to setup granular read and write access and/or | ||
| 44 | a simple push-notification instant deployment configuration. | ||
| 45 | |||
| 46 | =head1 SEE ALSO | ||
| 47 | |||
| 48 | Similar purpose and functionality with L<Git::Hooks> but more powerful and less dependencies. | ||
| 49 | |||
| 50 | =head1 AUTHOR | ||
| 51 | |||
| 52 | Rob Brown <bbb@cpan.org> | ||
| 53 | |||
| 54 | =head1 DEVELOPMENT | ||
| 55 | |||
| 56 | This module is maintained on github: | ||
| 57 | |||
| 58 | https://github.com/hookbot/git-server | ||
| 59 | |||
| 60 | Report feature requests or bugs here: | ||
| 61 | |||
| 62 | https://github.com/hookbot/git-server/issues | ||
| 63 | |||
| 64 | Pull requests welcome. | ||
| 65 | |||
| 66 | =head1 COPYRIGHT AND LICENSE | ||
| 67 | |||
| 68 | Copyright 2015-2026 by Rob Brown <bbb@cpan.org> | ||
| 69 | |||
| 70 | This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. | ||
| 71 | |||
| 72 | =cut |