2

I'm trying to run the following git repo command

repo init -u git://codeaurora.org/quic/le/le/manifest.git -b release -m [manifest xml] --repo-url=git://codeaurora.org/tools/repo.git --repo-branch=caf-stable

but I keep seeing the following gpg error:

gpg: Can't check signature: No public key
fatal: cloning the git-repo repository failed, will remove '.repo/repo'

I tried to follow the steps as stated here to no avail

curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

chmod a+x ~/bin/repo
xyf
  • 664
  • 1
  • 6
  • 16

3 Answers3

4

I ran into this and found out you need to have the right gpg key in the ~/.repoconfig folder

Similar to https://stackoverflow.com/a/63125058

But put the key in right place.

mkdir -p ~/.repoconfig/gnupg/
GNUPGHOME=~/.repoconfig/gnupg/ gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 692B382C
  • running the second command errors out @ `--keyserver: command not found` – xyf Dec 10 '20 at 23:16
  • I tried the solution that's linked in your response and I was able run the `repo init` command but does that mean i'd have to use `/usr/bin/repo` for every repo command I need to run? – xyf Dec 11 '20 at 00:20
  • after repo init, I tried running `repo sync` and now it complains how I should be using python 2.6 - 2.7 instead...tried `/usr/bin/repo` as well but it gives out `ValueError` – xyf Dec 11 '20 at 00:22
  • Oops. I messed up my command. It it for gpg, which I have fixed now. – Paul Kasemir Dec 12 '20 at 00:54
  • Try starting over and remove the --repo-url and --repo-branch args. I also had issues with the caf-stable and it worked for me without them. – Paul Kasemir Dec 12 '20 at 00:58
  • are you implying there are issues with caf-stable and even repo url? – xyf Dec 12 '20 at 07:47
  • In short yes. It works for some of my colleagues, but not me, so maybe it depends on the version of python or the host operating system. – Paul Kasemir Dec 13 '20 at 14:12
  • 1
    what python version are you using? When I tried your trick, I'm now getting a syntax error `TypeError: a bytes-like object is required, not 'str'` – xyf Dec 14 '20 at 03:52
  • Yes, I got that too. I found that if using the codeaurora repo that you have to use python2. – Paul Kasemir Dec 18 '20 at 01:19
  • great answer, thanks. I had to use a different keyserver though, that one seems to be down. `keyserver.ubuntu.com` or `pgp.mit.edu` worked for me – Mark Ch Mar 26 '22 at 16:15
2

If you dont want to locate the CAF key and download it; the following should work. Install repo from -> https://source.android.com/setup/develop#installing-repo

Drop the --repo-url=git://codeaurora.org/tools/repo.git --repo-branch=caf-stable from your repo init command.

thatsam
  • 21
  • 1
1

This below solution worked for me. First delete the repo u installed with the bin directory.

 rm -rf ~/bin

Then delete config file with the below commands.

rm -rf .repoconfig/ rm -rf .gnupg/ (if available)

Then install the repo with the below commands.

sudo apt-get install repo

Then to install the signature run the below commands.

repo init

This will download the required signatures.

That's it, Run the repo init -u <manifest url> -b <release> -m <manifest file>...

repo sync it will start the sync.

Experimented on Ubuntu version: 18.04

Fizn-Ahmd
  • 69
  • 5