Fedpkg -fatal: Could not read from remote repository

I’m trying to build grub2 locally using fedpkg, but it shows me this error whenever i try to clone it.

thisisyaash@yaashs-fedora:~/fedora$ fedpkg clone grub2
Cloning into 'grub2'...
The authenticity of host 'pkgs.fedoraproject.org (38.145.60.17)' can't be established.
RSA key fingerprint is SHA256:Q12OTyTeOHWlS54dTzy2BNu7wB8UKNf18+7WHIDsORc.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'pkgs.fedoraproject.org' (RSA) to the list of known hosts.
Connection closed by 38.145.60.17 port 22
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Could not execute clone: Failed to execute command.
thisisyaash@yaashs-fedora:~/fedora$ fedpkg clone grub2
Cloning into 'grub2'...
Connection closed by 38.145.60.17 port 22
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Could not execute clone: Failed to execute command.

Note: This is my first time using fedpkg to clone a package.

Do you have SSH key configured in your FAS account?

You can also use --anonymous to clone the repo without authenticating: fedpkg clone --anonymous grub2

2 Likes

“Do you have SSH key configured in your FAS account?”

I can’t understand this, but I have added ssh key in my FAS account.

So in order clone the a package, the ssh key in local and the one FAS account should match?
is that what you are trying to say?

You can also use --anonymous to clone the repo without authenticating: fedpkg clone --anonymous grub2

yes, this works! But I want to test the package and give feedbacks in koji. So will it help me if i use --anonymous?

Koji is a build system it does not have a feedback mechanism.
For packages being tested there is bodhi, that does allow feedback before a package is added to updates. Or for a released package you can use the bug tracker.

2 Likes

ah yes “bodhi”…
So in order to test a package,

But the thing is how do I clone it?
It shows me this erros fatal: Could not read from remote repository, do I need to have the same ssh keys as FAS account in my local machine?

I assume this is using git over ssh. This requires you to use the ssh key that you added to fas.

1 Like

If all you want to do is to test a package that is already build and waiting in bodhi, you don’t need to clone the dist git repository. Simply go to https://bodhi.fedoraproject.org/, find the update you want to test and follow the instructions to install it. I am currently not seeing any update for grub2 waiting for testing, but lets use this 3 days old one for Fedora 41 as an example – you’d simply need to run sudo dnf upgrade --refresh --advisory=FEDORA-2024-00dde77de9 to get the 2.12-13 version on your system, no extra steps needed.

If you want to test something that is not build yet, but the new (or patched) version was already pushed to the dist git repository, then you’ll need to clone it. In that case you can use --anonymous, that’s ok for testing. If you are not package maintainer building the package for Fedora, you don’t need the repo configured with SSH which requires authentication.

And to actually build the package for testing from the cloned repository, you can then use fedpkg local (runs the build locally on your machine for the version of Fedora you are currently running) or fedpkg mockbuild (runs in Mock chroot environment so you can build the package for different versions of Fedora as well).

1 Like

You MUST use -a/anononymous if you are not a official packager.
ssh access only works for them due to some historical setup… someday hopefully we can remove that restriction.

2 Likes