"gpg: Can't check signature: No public key" upon initializing a repo from code aurora

Viewed 6656

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
3 Answers

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

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

Related