Re: [gitorious] Pull over git uses the wrong path after upgrade

2013-05-24 Thread Marius Mårnes Mathiesen

larsm...@gmail.com writes:

> On Friday, May 24, 2013 9:00:20 AM UTC+2, Marius Mårnes Mathiesen wrote:
>>
>> The path to the repository will have to be resolved from the database
>> based on the incoming Git URL. The common way to resolve this is to use
>> a proxy server listening on port 9418 (the public git:// port) which
>> resolves the URL and proxies the connection to a backend git-daemon
>> process.
>>
>> Have a look in the script/git-proxy file in your installation. It
>> contains these instructions:
>>
>
> Thanks, that looks like a much more principled solution. I'm a bit
> surprised that this isn't done by default, is there a reason for that?

IIRC this is how the community edition will set it up, which is probably
as close to a default setup there is.


Cheers,
- Marius

-- 
-- 
To post to this group, send email to gitorious@googlegroups.com
To unsubscribe from this group, send email to
gitorious+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Gitorious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to gitorious+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [gitorious] Pull over git uses the wrong path after upgrade

2013-05-24 Thread larsmans
On Friday, May 24, 2013 9:00:20 AM UTC+2, Marius Mårnes Mathiesen wrote:
>
> The path to the repository will have to be resolved from the database 
> based on the incoming Git URL. The common way to resolve this is to use 
> a proxy server listening on port 9418 (the public git:// port) which 
> resolves the URL and proxies the connection to a backend git-daemon 
> process. 
>
> Have a look in the script/git-proxy file in your installation. It 
> contains these instructions:
>

Thanks, that looks like a much more principled solution. I'm a bit 
surprised that this isn't done by default, is there a reason for that?

-- 
-- 
To post to this group, send email to gitorious@googlegroups.com
To unsubscribe from this group, send email to
gitorious+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Gitorious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to gitorious+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [gitorious] Pull over git uses the wrong path after upgrade

2013-05-24 Thread Marius Mårnes Mathiesen

larsm...@gmail.com writes:

> Dear all,
>
> I'm experiencing a strange problem after upgrading an old (2011) Gitorious
> installation to a new one (installed as per getgitorious.com).
>
> I managed to transfer all of my repositories using some rsync magic, and
> now cloning, pushing and pulling over SSH work fine, but using the git://
> protocol only works for new repos.
>
> This seems to have to do with the changed directory layout in
> gitorious/repositories; the old repos have a name apparently based on SHA-1
> (e.g. 429/e18/bb2375275f8ea135fb6cdf77b6476375d5.git), while the new ones
> follow a project/reponame format. Apparently, when using the git://
> protocol, the old style names are used, since I get log messages in
> /var/log/messages of the form
>
> May 23 14:21:35 github git-daemon[16998]: Request upload-pack for
> '/project/reponame.git'
> May 23 14:21:35 github git-daemon[16998]:
> '/var/www/gitorious/repositories/project/reponame.git' does not appear to
> be a git repository
>
> while my local Git client just says
>
> fatal: The remote end hung up unexpectedly
>
> Is there an easy way to fix this? E.g., can I systematically symlink the
> new names to the old ones?

Lars,
The path to the repository will have to be resolved from the database
based on the incoming Git URL. The common way to resolve this is to use
a proxy server listening on port 9418 (the public git:// port) which
resolves the URL and proxies the connection to a backend git-daemon
process.

Have a look in the script/git-proxy file in your installation. It
contains these instructions:

# Alternative to script/git-daemon which uses the native git-daemon
# instead. Run this script on port 9418 and it will handle all git://
# access. As the name implies, this script simply acts as a proxy, translating
# the git urls presented in the web view to the hashed paths on the file system
# (which the native git-daemon then handles).
#
# Using script/git-proxy with git-daemon as an alternative to script/git-daemon
# has the advantage of being more stable, but requires two daemons instead of
# one, which complicates matters slightly.
#
# Running it
#
# First of all, make sure the native git-daemon is running. This example uses
# port 9400, but you can use any port of your liking:
#
# $ git daemon --listen=0.0.0.0 --port=9400 --syslog --export-all \
# --pid-file=/path/to/gitorious/tmp/pids/git-daemon-9400.pid \
# --base-path=/path/to/gitorious/repositories --verbose --reuseaddr 
\
# /path/to/gitorious/repositories
#
# NOTE: If you change the port for git-daemon, make sure to update
# config/git-proxymachine.rb to reflect the change (:remote, l40).
#
# Then run the git-proxy script:
#
# $ bundle exec /path/to/gitorious/script/git-proxy
#
# Test by issuing:
#
# $ git ls-remote git://gitorious.local/some/repo.git


Cheers,
- Marius

-- 
-- 
To post to this group, send email to gitorious@googlegroups.com
To unsubscribe from this group, send email to
gitorious+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Gitorious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to gitorious+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gitorious] Pull over git uses the wrong path after upgrade

2013-05-23 Thread larsmans
Dear all,

I'm experiencing a strange problem after upgrading an old (2011) Gitorious 
installation to a new one (installed as per getgitorious.com).

I managed to transfer all of my repositories using some rsync magic, and 
now cloning, pushing and pulling over SSH work fine, but using the git:// 
protocol only works for new repos.

This seems to have to do with the changed directory layout in 
gitorious/repositories; the old repos have a name apparently based on SHA-1 
(e.g. 429/e18/bb2375275f8ea135fb6cdf77b6476375d5.git), while the new ones 
follow a project/reponame format. Apparently, when using the git:// 
protocol, the old style names are used, since I get log messages in 
/var/log/messages of the form

May 23 14:21:35 github git-daemon[16998]: Request upload-pack for 
'/project/reponame.git'
May 23 14:21:35 github git-daemon[16998]: 
'/var/www/gitorious/repositories/project/reponame.git' does not appear to 
be a git repository

while my local Git client just says

fatal: The remote end hung up unexpectedly

Is there an easy way to fix this? E.g., can I systematically symlink the 
new names to the old ones?

TIA,
Lars

-- 
-- 
To post to this group, send email to gitorious@googlegroups.com
To unsubscribe from this group, send email to
gitorious+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Gitorious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to gitorious+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.