repo sync ends up with cannot fetch error in GitLab CI

379 views
Skip to first unread message

Root Mailer

unread,
Sep 22, 2022, 11:20:17 AM9/22/22
to Repo and Gerrit Discussion
In the .gitlab-ci.yml I do this:

git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@my.example.com/my-project/some-repo

which works just fine.

Now I have the manifest.xml that says:

<?xml version="1.0" encoding="UTF-8" ?>
<manifest>
<default sync-j="2"/>
<remote fetch="https://my.example.com/my-project" name="example"/>
<project name="some-repo" remote="example" revision="some-branch" path="sources/some-repo"/>
</manifest>

When I do this in the .gitlab-ci.yml:

repo init -u $CI_REPOSITORY_URL -m manifest.xml
repo sync

I get these errors:

Invalid clone.bundle file; ignoring.
error: Cannot fetch some-repo.git from https://my.example.com/my-project/some-repo.git
error: Cannot checkout some-repo.git: ManifestInvalidRevisionError: revision some-branch in some-repo.git not found
error: in `sync`: revision some-branch in some-repo.git not found

I guess this has something to do with missing credentials in the case of repo, because without repo it works just fine.

Also the revision some-branch not found is weird. The branch does exist.

Any help would be much appreciated!
Reply all
Reply to author
Forward
0 new messages