#7173 fedpkg asks for SL while creating arbitrary branch on forks at src.fp.o
Closed: Fixed 5 years ago Opened 5 years ago by bhavin192.

As described in #6361 and here I'm accessing src.fp.o with https.
When I run

$ fedpkg request-branch
Could not execute request_branch: You must provide SLs for non-release branches (remove-fgc) 

According to this document it should allow to create arbitrary branches on forks.

Link to my fork:
https://src.fedoraproject.org/fork/bhavin192/container/python3

$ rpm -q python2-openidc-client
python2-openidc-client-0.6.0-1.20180605gitcd8d91c.fc28.noarch
  • If we cannot complete your request, what is the impact?
    People using https to access src.fp.o will not be able to create branches on their forks

There should be no need to run fedpkg request-branch for fork branches...

just 'git branch foo; git push' should create branch foo in your fork.

You should also be able to delete branches in forks:

'git -D foo; git push'

It would be nice if fedpkg told you this in this case... but that sounds like a RFE for fedpkg.

Does that work for your case?

Yes, it worked for me. Previously I was trying to push with fedpkg push after creating branch with git checkout -b remove-fgc so it was giving me

$ fedpkg push
Current branch cannot be pushed anywhere!
fatal: The current branch remove-fgc has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin remove-fgc

Could not execute push: Command '['git', '-c', 'credential.helper=/usr/bin/fedpkg gitcred', '-c', 'credential.useHttpPath=true', 'push']' returned non-zero exit status 128

There should be no need to run fedpkg request-branch for fork branches...
just 'git branch foo; git push' should create branch foo in your fork.

Should this be documented somewhere in the wiki?

Well, possibly, but not sure where. ;(

The push thing is a git behavior. It always does that since it cannot be sure what upstream branch you want to push your local branch to. See:

https://stackoverflow.com/questions/37770467/why-do-i-have-to-git-push-set-upstream-origin-branch

and the top answer for all the nitty gritty history. I don't know that there is much we can do to change this without upstream git changing something and it's not clear what that would be.

If you see a likely spot, feel free to fill it in or let us know and we can update it....

Hope that answers everything here, if not feel free to add...

Metadata Update from @kevin:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

5 years ago

Just had the same problem following the advice at:

https://docs.fedoraproject.org/en-US/ci/pull-requests/

Both recommended options:

Clone your git repo using
fedpkg -a
for example:
fedpkg clone -a forks/pingoufpca/rpms/fedora-gather-easyfix
In this case fedpkg will take care of setting up correctly your git repository allowing you to push using
git push

and

Clone your git repo using
git clone https://...
and push using
fedpkg push
Here as well, fedpkg will take care of configuring correctly your git repository.

Results in the "has no upstream branch" error.

Is there any workaround to this? I have a one line patch, and I feel like I've been rocketed back to the 1980s before CVS existed.

So, are you operating on the "forks/pingoufpca/rpms/fedora-gather-easyfix" repo? thats a repo made by the 'pingoufpca' user, so you wouldn't have any commit permissions.
You need to make your own fork...

go to:

https://src.fedoraproject.org/rpms/fedora-gather-easyfix

login

click on 'fork' in the top right.

It should then leave you at:

forks/minfrin/rpms/fedora-gather-easyfix

Then use the fedpkg -a command on that repo, commit your changes and push and it should all work.

Login to comment on this ticket.

Metadata