I'm trying to setup the environment to store Yocto's source code in a GitLab server in the company where I work.
I have pushed the original code to repositories without any problem, and their urls to clone each repository is something like this:
git@git.at.mycompany.com:myuser/repo1.git
git@git.at.mycompany.com:myuser/repo2.git,
git@git.at.mycompany.com:myuser/repo3.git,
I want to keep this code untouched, so I created a group and forked every repository, and the URLS to those forked repositories are like this:
git@git.at.mycompany.com:yocto-group/repo1.git
git@git.at.mycompany.com:yocto-group/repo2.git
git@git.at.mycompany.com:yocto-group/repo3.git
Now, having this in mind I have created my manifest repository with the default.xml file with this content:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="git@git.at.mycompany.com:yocto-group" name="mycompany"/>
<default sync-j="1" remote="mycompany" />
<project remote="mycompany" revision="4a68a44f56c725914cfa721993a2ea8a3dc6ebd5" name="repo1" path="sources/poky"/>
<project remote="mycompany" revision="eabb07f6d2fc3318fd50f05d364372a96e0b12ed" name="repo2" path="sources/meta-security"/>
<project remote="mycompany" revision="c6e7bf94debb7bdd7a2b52b222a4b0da732a24b4" name="repo3" path="sources/meta-virtualization"/>
</manifest>
I upload this to git@git.at.mycompany.com:yocto-group/manifests.git and then use repo like this:
repo init -u git@git.at.mycompany.com:yocto-group/manifests.git -m default.xml -b develop
The output is:
Get https://gerrit.googlesource.com/git-repo/clone.bundle
Get https://gerrit.googlesource.com/git-repo
remote: Finding sources: 100% (20/20)
remote: Total 20 (delta 4), reused 20 (delta 4)
Unpacking objects: 100% (20/20), done.
From https://gerrit.googlesource.com/git-repo
34bc571..0b304c0 master -> origin/master
Get git@git.at.mycompany.com:yocto-group/manifests.git
remote: Enumerating objects: 591, done.
remote: Counting objects: 100% (591/591), done.
remote: Compressing objects: 100% (322/322), done.
remote: Total 591 (delta 284), reused 527 (delta 263)
Receiving objects: 100% (591/591), 2.94 MiB | 661.00 KiB/s, done.
Resolving deltas: 100% (284/284), done.
From git.at.mycompany.com:yocto-group/manifests
* [new tag] LSDK-17.12-ls1012a-AB-tc1 -> LSDK-17.12-ls1012a-AB-tc1
* [new tag] LSDK-18.09 -> LSDK-18.09
* [new tag] lx2160a-early-access-bsp0.1-p2 -> lx2160a-early-access-bsp0.1-p2
* [new tag] lx2160a-early-access-bsp0.2 -> lx2160a-early-access-bsp0.2
* [new tag] lx2160a-early-access-bsp0.3 -> lx2160a-early-access-bsp0.3
* [new tag] lx2160a-early-access-bsp0.4 -> lx2160a-early-access-bsp0.4
* [new tag] lx2160a-early-access-bsp0.4-p1 -> lx2160a-early-access-bsp0.4-p1
* [new tag] lx2160a-early-access-bsp0.4-p2 -> lx2160a-early-access-bsp0.4-p2
* [new tag] master-ls1046afrwy -> master-ls1046afrwy
* [new tag] yocto_2.6_es_1906 -> yocto_2.6_es_1906
* [new tag] yocto_2.6_es_1909 -> yocto_2.6_es_1909
* [new tag] yocto_2.6_es_1909_update_291119 -> yocto_2.6_es_1909_update_291119
* [new tag] yocto_2.7 -> yocto_2.7
* [new branch] develop -> origin/develop
* [new branch] master -> origin/master
Your identity is: Johan Duque <johan.duque@mycompany.com>
If you want to change this, please re-run 'repo init' with --config-name
repo has been initialized in /home/lex/Documents/yocto/tmp
So this went fine.
The problem occurs when I do repo sync
,
I get this:
> GitLab: The project you were looking for could not be found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Any idea how to solve this and success in repo sync ?
I found a way to solve this, I had to edit the remote like this:
<remote fetch="ssh://git@git.at.mycompany.com/yocto-group" name="mycompany"/>
I added the protocol and modified the : by /