Commit graph

164 commits

Author SHA1 Message Date
Tommi Virtanen
73a0325204 Use "git shell" instead of "git-shell", for compatibility with git 1.6. 2008-08-25 19:55:45 +03:00
Tommi Virtanen
7e407d1013 Add a MANIFEST.in to please setuptools sdist. 2008-07-30 14:20:43 +03:00
Tommi Virtanen
72c754b2f0 Accept "git upload-pack" etc, for future compatibility. 2008-06-26 11:33:48 +03:00
Tommi Virtanen
38561aa6a5 Understand the popular gitosis.conf typo "writeable".
Log a warning still, don't want that to get too common.
2008-04-19 19:10:36 +03:00
Tommi Virtanen
a938dccf82 Show how group sections in config can be used in example.conf. 2008-04-15 15:52:17 +03:00
Tommi Virtanen
4d8ba7788d Allow absolute paths in repo paths, treat them as relative.
As the only convenient way to use non-standard SSH ports with git is
via the ssh://user@host:port/path syntax, and that syntax forces
absolute urls, just force convert absolute paths to relative paths;
you'll never really want absolute paths via gitosis, anyway.
2008-03-19 21:55:19 +02:00
Tommi Virtanen
f839f889b6 Make serve acceptable path unit tests more careful.
Tests used to trigger the wanted security exception merely by being
unquoted, that's not good enough.
2008-03-19 21:52:03 +02:00
Tommi Virtanen
f7bcd554fa Test that incoming paths cannot contain /../ 2008-03-19 21:28:46 +02:00
Tommi Virtanen
e1d150daf5 Show alternate gitweb.conf access control config. 2008-02-19 08:57:59 +02:00
Tommi Virtanen
9708fb2cc9 State that sharing user accounts for two uses is advanced usage. 2008-02-16 12:17:18 +02:00
Tommi Virtanen
f724a2e724 Add mod_redirect to lighttpd example config snippet. 2008-02-05 13:18:46 +02:00
Tommi Virtanen
b04fbb1df7 Fix bug where members=@all didn't actually give access. 2008-01-17 02:15:52 +02:00
Tommi Virtanen
5b3f2f7a4d Fix typo that made push fail in writeAuthorizedKeys. 2007-12-31 21:30:41 +02:00
Tommi Virtanen
e495c9a66e Make post-update hook reload config after writing it out.
Without this, any changes to repository settings would only be
applied after one extra (non-empty) push.

Add unit test coverage for the post-update hook.

Make SSH authorized_keys path configurable, mostly for unit tests.
2007-12-31 21:11:22 +02:00
Tommi Virtanen
895fd8b7ad Allow using fast_import for more than initial commit. 2007-12-31 19:30:27 +02:00
Tommi Virtanen
be91386b45 Don't always init repository when doing fast-import. 2007-12-31 19:18:52 +02:00
Tommi Virtanen
27bd3c9954 Allow uppercase in usernames. 2007-12-17 19:08:36 +02:00
Tommi Virtanen
b5e966c107 Allow underscores, dots and dashes in SSH username local parts. 2007-12-11 22:50:04 +02:00
Tommi Virtanen
cbea1785d0 Enforce safe usernames also when reading public key files from keydir.
Warning: if your keyfiles contain more than just a-z0-9, at sign, dots
or dashes, you will likely end up cutting off your access to your
gitosis repository with this upgrade.
2007-12-11 22:43:05 +02:00
Tommi Virtanen
a5a758a407 Create ~git/gitosis in gitosis-init.
This fixes problems with e.g. "No such file or directory:
'/.../git/gitosis/projects.list.42.tmp'" in generate_project_list when
running gitosis-init.

Existing users need to run::

	 sudo install -d -m0755 -o git -g git ~git/gitosis

adjust the user and group name if necessary. Alternatively,
just rerun gitosis-init.
2007-12-11 22:29:43 +02:00
Tommi Virtanen
2078a0c828 Write gitweb projects.list to ~/gitosis, not inside the gitosis-admin repo.
This allows running gitweb as a separate user without needing to allow it
read access to gitosis-admin.git. Running as separate user will still most
likely require a ``chgrp www-data`` of the relevant repositories, but
nothing not already decided public needs to be exposed.

Existing gitweb users will need to adjust their gitweb.conf to point to
the new location of the projects.list file.

Removing the old projects.list from
~git/repositories/gitosis-admin.git/projects.list is safe once gitweb
has switched to using the new location.
2007-11-29 00:40:34 +02:00
Tommi Virtanen
6ab2aa0a4b Add instructions for using gitweb. 2007-11-25 18:32:02 +02:00
Tommi Virtanen
d875e0fe5a Add instructions for using git-daemon. 2007-11-25 18:14:29 +02:00
Tommi Virtanen
e6940bfa94 Add TODO note. 2007-11-18 18:09:35 +02:00
Tommi Virtanen
107833667a Let *.pub files have multiple lines, each containing one SSH key.
Makes managing accounts and access for people with multiple client
machines easier.
2007-11-18 18:08:09 +02:00
Tommi Virtanen
bda6572c92 When autocreating repositories on push, set git-daemon-export-ok etc.
Without this, it would need a separate push to gitosis-admin.git,
after the repository is autocreated, to get it to show up and be
anonymously usable.
2007-11-18 17:50:02 +02:00
Tommi Virtanen
af0081a197 Update TODO list.
In a gitosis-style setup, you can deal with most needs for cloneurl
via git_base_url_list in gitweb.conf.
2007-11-18 17:30:08 +02:00
Tommi Virtanen
4e76065fb7 Set description from config file for gitweb use. 2007-11-17 17:40:34 +02:00
Tommi Virtanen
d85d60f73c Make repository.export work even with relative git_dir.
It changes the current directory, so it can't set --git-dir to a
(potentially) relative path. Make path absolute before using it.

This should fix post-update hook problems.
2007-11-17 16:49:53 +02:00
Tommi Virtanen
13c89cdb7d Manage git-daemon-export-ok flags from gitosis config. 2007-11-17 16:27:21 +02:00
Tommi Virtanen
2487c658ba Add unit test for gitweb.generate_project_list. 2007-11-17 14:32:43 +02:00
Garry Dolley
8bbf93c532 generate_fp should be generate_project_list_fp 2007-11-17 01:46:07 -08:00
Tommi Virtanen
5bd5bd5bfc Give meaningful name to gitweb projects.list generation.
Remove mentions of cancelled gitweb.conf generation from docstrings.
2007-11-15 22:22:19 +02:00
Tommi Virtanen
a30645db52 Remove TODO to create gitweb.conf, that would be a security issue.
Implementing it would mean user git could run perl code as www-data,
on most setups. Not good.
2007-11-15 22:04:22 +02:00
Tommi Virtanen
e8f6d7947d Bring TODO list up to date. 2007-11-15 22:02:31 +02:00
Tommi Virtanen
6e76b0da05 Avoid decorators to be compatible with python2.3 (for now). 2007-11-15 21:23:07 +02:00
Tommi Virtanen
24e1196507 Depend on a new enough setuptools to preserve data file access modes. 2007-11-15 21:11:59 +02:00
Tommi Virtanen
a2e5470426 Create leading directories when creating missing repos in gitosis-serve.
Creation is in gitosis.serve and not directly in repository.init(),
because that's the location that can tell what part of the directory
tree is allowed to be missing. Made the reconstructed git command
include the extension as that was easier to do.

haveAccess return value is now tuple, to preserve information on what
parts of the path can be missing.
2007-11-15 20:56:15 +02:00
Tommi Virtanen
ea9ee97046 Fix copy-paste that made gitosis.gitweb use wrong logger. 2007-11-15 20:52:47 +02:00
Tommi Virtanen
810179e4d4 Make repository.export work with newer git.
gitosis-init and the post-update hook used to fail with
GitCheckoutIndexError, when run with git >=1.5.3, which made
checkout-index require GIT_WORK_TREE, jump through hoops to provide
it, but still be backwards compatible with older git.

Thanks to Garry Dolley for hunting the bug.
2007-11-15 19:02:55 +02:00
Tommi Virtanen
a3fc27143a Make gitosis-serve pass through environment to git-shell. 2007-11-15 17:25:36 +02:00
Tommi Virtanen
7743e80d87 Make repository.export unit tests use --git-dir= too. 2007-11-15 17:22:06 +02:00
Tommi Virtanen
8e488ad02f Make repository.has_initial_commit pass through environment to git. 2007-11-15 17:20:39 +02:00
Tommi Virtanen
aa529dcd65 Make repository.export pass through environment to git. 2007-11-15 17:17:20 +02:00
Tommi Virtanen
aa1c0712be Make repository.fast_import pass through environment to git. 2007-11-15 17:10:40 +02:00
Tommi Virtanen
a9e37272cd Make repository.init pass through environment to git. 2007-11-15 17:10:25 +02:00
Tommi Virtanen
c81daadc79 Missed mkdir in README 2007-10-30 18:26:49 +02:00
Tommi Virtanen
c83c23fbaf Update for release v0.2. 2007-09-03 23:28:35 -07:00
Tommi Virtanen
a813f31370 Add TODO notes. 2007-09-03 23:26:14 -07:00
Tommi Virtanen
805688c08e Fix initial push syntax in README. Needs to say "refs/heads/". 2007-09-03 23:26:14 -07:00