> I have been working on setting up gerrit on my school's server. The
> web interface it up and I have successfully created a project using
> the ssh command.
> However, when I run
> repo init -u git://my.server.name/path/repo.git
>
> It checks for the newest version of repo - OK
> Then hangs when it tries to check out my repo.git
>
> I suspect this could be a firewall issue.
> Does repo init run on top of SSH?
No, it uses the Git URL that you specify with the -u option, so in
your case it uses the native port 9418 Git protocol *unless* you have
an insteadOf block in your ~/.gitconfig to rewrite your server URL to
a different one. That could explain why git://android.git.kernel.org
is accessible but git://my.server.name isn't. Please check your
~/.gitconfig for any insteadOf occurences and investigate what firewall
restrictions you have. For example, are you able to connect to port 9418
of your server using a telnet client?
> That means repo upload will also.
> If it does then I need to get my sysadmin to open up the SSH port,
> just like they needed to for the web interface?
Uploads always use SSH.
--
Magnus Bäck Opinions are my own and do not necessarily
SW Configuration Manager represent the ones of my employer, etc.
Sony Ericsson
> I seem to having a lot of problems getting this
> repo init -u command to work.
> Should I be starting something on the gerrit that is listening on
> 9418?
The Git protocol (git:// URLs) is typically set up to use port 9418, so
when you tried to sync from such a URL I assumed you had a Git daemon
set up. Gerrit doesn't provide such a daemon, so you'll have to set it
up yourself. If you don't want to do that you need to use Gerrit's SSH
daemon.
> I've tried allowing the port in my iptables, but that won't do
> anything because I still have nothing actually listening on that port.
> I downloaded git-daemon, but can't seem to find a command to get that
> running.
> By default when I do a /bin/gerrit.sh start it only opens up 29418 and
> 8080.
> I was able to clone a git repo over ssh, but I don't want to have to
> type long commands everytime I want to push back to gerrit for review.
If you clone from ssh://first...@hostname.example.com:29418 you can
push back with "git push origin ...". To avoid having to this lengthy
URL you can either set up an insteadOf rule to have Git rewrite the URL
for you, for example
[url "ssh://first...@hostname.example.com:29418"]
insteadOf = ssh://hostname
or you could set up an SSH client alias in your ~/.ssh/config:
Host hostname
HostName hostname.example.com
Port 29418
User first.last
Thank you.
**Resolved**
For anyone reading this thread.
I ended up using the SHH protocol, but also scrapping the REPO tool
all together.
I believe that Android only used REPO because they want to pull from
several repos into one. For our purposes this would only complicate
things, because we aren't receiving contributions from all over.
These are the following commands that I use
Making a copy of the repo
git clone ssh://myserver.address:29418/path/myreponame.git
Setting up references to go through gerrit code review system
git config remote.origin.push HEAD:refs/for/master
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en