I don't think the `fedpkg fork` command, even with the `--user` option is quite right for this.
First, it requires setting `fedpkg set-distgit-token` after first going to https://src.fedoraproject.org/settings#nav-api-tab to create a token with fork permissions. This makes no sense since no matter what I do with my own tokens, I won't have permission to create a fork in some other user's account. Second, it always succeeds, even if there is no such fork. It *always* reports that the repo already exists, and then it says it adds it as a remote. It doesn't even matter if the user exists or not. Third, you cannot fetch using git+ssh to another user's fork. You have to make sure you add the fork with `-a` so it clones it using the https (anonymous) URLs. Ultimately, I was able to do: fedpkg set-distgit-token fedpkg --user OTHER_USER fork -a git fetch ... But setting the token to do this isn't quite right. A better option would be if a command existed `fedpkg add-fork OTHER_USER` which automatically adds the fork using the https/anonymous URL, but did not require the token to create new forks (since that's not what is being done). The misleading success messages should not be shown. Whether or not the fork actually exists can be discovered upon first fetch from the added remote. As far as I can tell, there is no command that does this now, but might be a nice feature addition. On Tue, Jun 2, 2026 at 9:37 PM Michal Schorm <[email protected]> wrote: > > Works for me as described in the 'fedpkg fork --help': > > " > Operation requires username (FAS_ID). by default, current logged > username is taken. > It could be overridden by reusing an argument: > > fedpkg --user FAS_ID fork > " > > So e.g.: > > #] fedpkg --user psloboda fork > Repo 'https://src.fedoraproject.org/fork/psloboda/rpms/mariadb-connector-c' > already exists. > Adding as remote 'psloboda'. > > #] git remote -v > mschorm > ssh://[email protected]/forks/mschorm/rpms/mariadb-connector-c.git > (fetch) > mschorm > ssh://[email protected]/forks/mschorm/rpms/mariadb-connector-c.git > (push) > origin ssh://[email protected]/rpms/mariadb-connector-c (fetch) > origin ssh://[email protected]/rpms/mariadb-connector-c (push) > psloboda > ssh://[email protected]/forks/psloboda/rpms/mariadb-connector-c.git > (fetch) > psloboda > ssh://[email protected]/forks/psloboda/rpms/mariadb-connector-c.git > (push) > > > > Michal > > -- > > Michal Schorm > Senior Software Engineer > Databases Team > Red Hat > > -- > > On Wed, Jun 3, 2026 at 1:42 AM Christopher <[email protected]> wrote: > > > > From what I understand, "fedora fork" creates a fork using my own > > account. What I want is something different. I want to add another > > user's fork as a remote to my local clone, so I can check out their > > merge request branch, and evaluate their proposed diff locally. I > > don't think the "fedora fork" command can add a remote for a different > > user's fork. > > > > On Tue, Jun 2, 2026 at 7:31 PM Michal Schorm <[email protected]> wrote: > > > > > > Hi Christopher, > > > > > > is 'fedpkg fork' what you are looking for? > > > > > > When called inside of the cloned repo, it adds your fork as a remote > > > with your nick. > > > If the fork does not exist yet, it creates it and then adds it. > > > > > > #] fedpkg fork > > > Repo > > > 'https://src.fedoraproject.org/fork/mschorm/rpms/mariadb-connector-c' > > > already exists. > > > Adding as remote 'mschorm'. > > > > > > #] git remote -v > > > mschorm > > > ssh://[email protected]/forks/mschorm/rpms/mariadb-connector-c.git > > > (fetch) > > > mschorm > > > ssh://[email protected]/forks/mschorm/rpms/mariadb-connector-c.git > > > (push) > > > origin ssh://[email protected]/rpms/mariadb-connector-c > > > (fetch) > > > origin ssh://[email protected]/rpms/mariadb-connector-c > > > (push) > > > > > > -- > > > > > > The PR refs can be added by e.g.: > > > git fetch https://src.fedoraproject.org/rpms/mariadb10.11.git > > > refs/pull/38/head:pr38 > > > for e.g.: > > > https://src.fedoraproject.org/rpms/mariadb10.11/pull-request/38 > > > > > > It shows you the command when you click the tiny text "Pull this > > > pull-request locally" at the bottom of any PR just under the textarea > > > box in any src.fp.o PR. > > > > > > Michal > > > > > > -- > > > > > > Michal Schorm > > > Senior Software Engineer > > > Databases Team > > > Red Hat > > > > > > -- > > > > > > On Wed, Jun 3, 2026 at 12:58 AM Christopher <[email protected]> > > > wrote: > > > > > > > > Is there already an easy fedpkg command to add a remote to a local > > > > clone? I can't seem to find one in the docs and it's a bit tedious to > > > > type out "git remote add <forkuser> > > > > https://src.fedoraproject.org/forks/<forkuser>/rpms/<project>.git" > > > > > > > > I could create my own git alias, but it would be nice to do something > > > > like `fedpkg add-forked-remote <forkuser>` or something like that. I'm > > > > just not sure if something like that already exists. > > > > > > > > Alternatively (or in addition to), is there a way to easily fetch the > > > > merge request refs? I know this is easy to do on GitHub with an extra > > > > fetch line in .git/config with something like: `fetch = > > > > +refs/pull/*/head:refs/remotes/github/pr/*`; are there similar refs > > > > for the merge requests in pkgs.fedoraproject.org? > > > > > > > > Basically, I just want to easily inspect a merge request from another > > > > user locally. > > > > > > > > Thanks, > > > > Christopher > > > > > > > > P.S. Related annoyance: I tried to switch from 4096 ssh-rsa to > > > > ecdsa-sha2-nistp521 recently, but pkgs.fedoraproject.org doesn't seem > > > > to like that key type, and I could no longer fedpkg clone. > > > > -- > > > > _______________________________________________ > > > > devel mailing list -- [email protected] > > > > To unsubscribe send an email to [email protected] > > > > Fedora Code of Conduct: > > > > https://docs.fedoraproject.org/en-US/project/code-of-conduct/ > > > > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > > > > List Archives: > > > > https://lists.fedoraproject.org/archives/list/[email protected] > > > > Do not reply to spam, report it: > > > > https://forge.fedoraproject.org/infra/tickets/issues/new > > > > > > -- > > > _______________________________________________ > > > devel mailing list -- [email protected] > > > To unsubscribe send an email to [email protected] > > > Fedora Code of Conduct: > > > https://docs.fedoraproject.org/en-US/project/code-of-conduct/ > > > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > > > List Archives: > > > https://lists.fedoraproject.org/archives/list/[email protected] > > > Do not reply to spam, report it: > > > https://forge.fedoraproject.org/infra/tickets/issues/new > > -- > > _______________________________________________ > > devel mailing list -- [email protected] > > To unsubscribe send an email to [email protected] > > Fedora Code of Conduct: > > https://docs.fedoraproject.org/en-US/project/code-of-conduct/ > > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > > List Archives: > > https://lists.fedoraproject.org/archives/list/[email protected] > > Do not reply to spam, report it: > > https://forge.fedoraproject.org/infra/tickets/issues/new > > -- > _______________________________________________ > devel mailing list -- [email protected] > To unsubscribe send an email to [email protected] > Fedora Code of Conduct: > https://docs.fedoraproject.org/en-US/project/code-of-conduct/ > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > List Archives: > https://lists.fedoraproject.org/archives/list/[email protected] > Do not reply to spam, report it: > https://forge.fedoraproject.org/infra/tickets/issues/new -- _______________________________________________ devel mailing list -- [email protected] To unsubscribe send an email to [email protected] Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/[email protected] Do not reply to spam, report it: https://forge.fedoraproject.org/infra/tickets/issues/new
