azzurris / git-repo

Automatically exported from code.google.com/p/git-repo
Apache License 2.0
0 stars 0 forks source link

repo sync on mirror workspace fail on updating the manifest mirror since v1.12.14 #166

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Affected Version: v1.12.14
Environment: Linux

Since v1.12.14, repo sync on a mirror workspace fails when trying to add/update 
the manifest to/in the mirror:

Fetching projects:  88% (93/105)  Fetching project FOO_manifests
FATAL: invalid repo name: 'foo/gitolite@example.co.de.com:foo/FOO_manifests'
fatal: Could not read from remote repository:

    Please make sure you have the correct access rights
    and the repository exists.
    FATAL: invalid repo name: 'foo/gitolite@example.co.de.com:foo/FOO_manifests'
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.
    error: Cannot fetch FOO_manifests

    error: Exited sync due to fetch errors

Indeed, git-repo create a FOO_manifests.git directory with a config file:

    [remote "origin"]
            url = gitolite@example.co.de.com:foo/gitolite@example.co.de.com:foo/FOO_manifests
            projectname = FOO_manifests
            fetch = +refs/heads/*:refs/heads/*

While the configuration file .repo/manifests.git is:

    [remote "origin"]
            url = gitolite@example.co.de.com:foo/FOO_manifests.git
            fetch = +refs/heads/*:refs/remotes/origin/*

The later has the correct URL: this is the URL used in repo init.

So it seems that the creation of the mirror for the manifest is building a 
wrong URL, probably matching / and adding the host part of the git remote.

Regards.

Original issue reported on code.google.com by yann@droneaud.fr on 30 Apr 2014 at 2:08

GoogleCodeExporter commented 9 years ago
It's surprising to encounter a regression, but I believe it's the expected 
behavor:
an URL is expected in <remote fetch= />, and gitolite@example.co.de.com: is not 
an URL and thus not supported in a manifest XML.

repo init -u gitolite@example.co.de.com:foo/FOO_manifests.git works, but it's 
probably not expected.

So as a workaround, I've replaced

    repo init -u gitolite@example.co.de.com:foo/FOO_manifests.git

by

    repo init -u ssh://gitolite@example.co.de.com/foo/FOO_manifests.git

Then, repo sync works correctly.

Original comment by yann@droneaud.fr on 30 Apr 2014 at 2:27