[PATCH] Authentication support for pserver
From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:43:59
Attachments
- git-cvsserver.patch [text/plain] 4040 bytes · preview
From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:43:59
I've patched git-cvsserver so that it supports pserver authentication as
opposed to only anonymous access. The patch itself works but I haven't
updated the relevant documentation or test cases and won't be able to do
so until after the weekend so I'm submitting what I have for review on
the list.
The pserver user/password database is stored in the config file for each
repository because I didn't know where else to put it, for example:
avar@oe:/tmp/fleh$ cat /tmp/git-test.git/config
[core]
repositoryformatversion = 0
filemode = true
bare = true
[gitcvs]
enabled = 1
[gitcvs.users]
avar = foobar
whee = whoo
The user can then login/checkout and do other operations with the
user/password set in the config file:
avar@oe:/tmp/fleh$ cvs -d:pserver:whee:whoo@localhost/tmp/git-test.git login
Logging in to :pserver:whee@localhost:2401/tmp/git-test.git
avar@oe:/tmp/fleh$ cvs -d:pserver:whee:oops@localhost/tmp/git-test.git login
Logging in to :pserver:whee@localhost:2401/tmp/git-test.git
The password supplied for user whee was incorrect
cvs login: authorization failed: server localhost rejected access to
/tmp/git-test.git for user whee
$ cvs -d:pserver:whee:whoo@localhost/tmp/git-test.git co master
cvs checkout: Updating master
U master/.emacs
[...]