Repo is a tool built on top of Git. Repo helps manage many Git repositories, does the uploads to revision control systems, and automates parts of the development workflow. To familarize various repo commands please see RepoCommandReference
Repo comes in two parts: One is a launcher script for installing, and it communicates with the second part, the full Repo tool included in a source code checkout. To install Repo:
Make sure that you have a bin/ directory in your home directory and that it's included in your path:
mkdir ~/binPATH=~/bin:$PATH
Download the Repo Launcher and ensure that it's executable:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo
After installing the Repo Launcher, set up your client to access the source code repository.
Create an empty directory to hold your working files.
mkdir WORKING_DIRECTORY cd WORKING_DIRECTORY
Configure Git with your name and email address. The name that you provide here shows up in attributions for your code submissions.
git config --global user.name "Your Name" git config --global user.email "you@example.com"
Run repo init to get the latest version of Repo with its most recent bug fixes. You must specify a URL for the manifest.
repo init -u https://code.rdkcentral.com/r/manifests -m <manifestfile.xml> –b <branch name>
example : repo init -u https://code.rdkcentral.com/r/manifests -m rdkv-raspberrypi.xml –b morty
To check out a branch other than master, specify it with -b. For a list of branches,
A successful initialization ends with a message stating that Repo is initialized in your working directory. Your client directory should now contain a .repo directory where files such as the manifest are kept.
To download the RDK source tree to your working directory from the repositories as specified in the default manifest, run:
repo sync
The RDK source files are located in your working directory under their project names.
By default, access to the RDK source code is anonymous and for restricted content user need to set up credential in .netrc file.
The first step is to create a password with the key generator tool. The second step is to force authenticated access by using the manifest URI https://code.rdkcentral.com/r/manifests.
Notice how the /r/ directory prefix triggers mandatory authentication. You can convert an existing client to use mandatory authentication with the following command:
repo init -u https://code.rdkcentral.com/r/manifestsWhen downloading from behind a proxy (which is common in some corporate environments), you might need to to explicitly specify the proxy that is then used by Repo:
export HTTP_PROXY=http://<proxy_user_id>:<proxy_password>@<proxy_server>:<proxy_port> export HTTPS_PROXY=http://<proxy_user_id>:<proxy_password>@<proxy_server>:<proxy_port>
7 Comments
Unknown User (akzare)
Jan 08, 2021I can successfully sign in via web browser. But, as I try to clone the code this error happens:
$ repo init -u https://code.rdkcentral.com/r/manifests -m rdkv-raspberrypi.xml Downloading Repo source from https://gerrit.googlesource.com/git-repo remote: Counting objects: 2, done remote: Finding sources: 100% (106/106) remote: Total 106 (delta 60), reused 106 (delta 60) Receiving objects: 100% (106/106), 119.92 KiB | 3.43 MiB/s, done. Resolving deltas: 100% (60/60), completed with 31 local objects. Downloading manifest from https://code.rdkcentral.com/r/manifests Username for 'https://code.rdkcentral.com': akzare Password for 'https://akzare@code.rdkcentral.com': Traceback (most recent call last): File "/home/.repo/repo/main.py", line 630, in <module> _Main(sys.argv[1:]) File "/home/.repo/repo/main.py", line 604, in _Main result = run() File "/home/.repo/repo/main.py", line 597, in <lambda> run = lambda: repo._Run(name, gopts, argv) or 0 File "/home/.repo/repo/main.py", line 266, in _Run result = cmd.Execute(copts, cargs) File "/home/.repo/repo/subcmds/init.py", line 531, in Execute self._SyncManifest(opt) File "/home/.repo/repo/subcmds/init.py", line 232, in _SyncManifest default_branch = m.ResolveRemoteHead() File "/home/.repo/repo/project.py", line 1926, in ResolveRemoteHead output = self.bare_git.ls_remote('-q', '--symref', '--exit-code', name, 'HEAD') File "/home/.repo/repo/project.py", line 3041, in runner (self._project.name, name, p.stderr)) error.GitError: manifests ls-remote: fatal: remote error: access at least one ref not permittedThis is also another issue:
I have also another same issue which I posted here:
https://github.com/psivasubramanian/rdkmanifest/issues/2
Deepthi Suseelan
Jan 13, 2021Unknown User (akzare)
Repo init issue looks like access related. Can you please mail the details and error to support@rdkcentral.com
Z-linjj
Dec 19, 2021Traceback (most recent call last):
File "/media/jason/MySsdDisk/MySourceForge/RDK-V/.repo/repo/main.py", line 385, in <module>
_Main(sys.argv[1:])
File "/media/jason/MySsdDisk/MySourceForge/RDK-V/.repo/repo/main.py", line 365, in _Main
result = repo._Run(argv) or 0
File "/media/jason/MySsdDisk/MySourceForge/RDK-V/.repo/repo/main.py", line 121, in _Run
copts, cargs = cmd.OptionParser.parse_args(argv)
File "/media/jason/MySsdDisk/MySourceForge/RDK-V/.repo/repo/command.py", line 45, in OptionParser
self._Options(self._optparse)
File "/media/jason/MySsdDisk/MySourceForge/RDK-V/.repo/repo/subcmds/sync.py", line 126, in _Options
self.jobs = self.manifest.default.sync_j
File "/media/jason/MySsdDisk/MySourceForge/RDK-V/.repo/repo/manifest_xml.py", line 245, in default
self._Load()
File "/media/jason/MySsdDisk/MySourceForge/RDK-V/.repo/repo/manifest_xml.py", line 287, in _Load
self.manifestProject.worktree))
File "/media/jason/MySsdDisk/MySourceForge/RDK-V/.repo/repo/manifest_xml.py", line 302, in _ParseManifestXml
root = xml.dom.minidom.parse(path)
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1918, in parse
return expatbuilder.parse(file)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 922, in parse
fp = open(file, 'rb')
IOError: [Errno 2] No such file or directory: '/media/jason/MySsdDisk/MySourceForge/RDK-V/.repo/manifest.xml'
Ganesh Sahu
Dec 21, 2021can you please post the commands executed before this error?
Z-linjj
Dec 21, 2021i fixed this problem:
because i forget used my system 'repo', not used rdk repo ; this is the reason!
shch20001
Nov 19, 2022Whatever menifest or branch I tried to repo init, I got this error message
$ repo init -u https://code.rdkcentral.com/r/manifests -m rdkb-extsrc.xml -b rdk-next
Downloading Repo source from https://gerrit.googlesource.com/git-repo
Username for 'https://code.rdkcentral.com':
Password for 'https://178150823@code.rdkcentral.com':
manifests:
fatal: remote error: manifests unavailable
siiaceon bolton karl
Sept 12, 2024how to resolve Unauthorized issue?
$ repo init -u https://code.rdkcentral.com/r/manifests -m rdkv-raspberrypi.xml
repo: reusing existing repo client checkout in D:\work\proj\research\RDK\code
manifests:
remote: Unauthorized
fatal: Authentication failed for 'https://code.rdkcentral.com/r/manifests/'
manifests: sleeping 4.0 seconds before retrying
[31mfatal: cannot obtain manifest https://code.rdkcentral.com/r/manifests[m
[31m================================================================================[m
[31mRepo command failed: UpdateManifestError[m
[31m Unable to sync manifest rdkv-raspberrypi.xml[m