Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Aspiring developer has difficulty with merge request
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
LemonadeLlama
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2021
Posts: 101
Location: New Zealand

PostPosted: Thu Jan 27, 2022 8:53 am    Post subject: [SOLVED]Aspiring developer has difficulty with merge request Reply with quote

Hello everyone. I am trying to push a change to the net-p2p/rtorrent package, in order to daemonise it properly. I have created a pull request here.

The issue is that I can't figure out how to get gpg keys working :?: . I followed the guide here, but I still don't know what I'm missing.

I really want to make this change official, but I can't get these damn keys working! :x If anyone has experience with GPG keys and signing commits, that would be much appreciated.


Last edited by LemonadeLlama on Thu Jan 27, 2022 8:05 pm; edited 2 times in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30905
Location: here

PostPosted: Thu Jan 27, 2022 9:23 am    Post subject: Reply with quote

I think you don't need a gpg key because final merge is done by a developer and that need to be signed by a gpg key.
To add 'Signed-off-by: ' you should only add --signoff option to git or use repoman commit -m <message> that check also other problem on your commit.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
LemonadeLlama
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2021
Posts: 101
Location: New Zealand

PostPosted: Thu Jan 27, 2022 9:32 am    Post subject: Reply with quote

fedeliallalinea wrote:
you should only add --signoff option to git


I tried updating my commit with that option and it didn't work. Note that this is on my gentoo fork because that's how I originally did my change.

Code:

$ git commit --amend --no-edit --signoff
error: gpg failed to sign the data
fatal: failed to write commit object


I also tried cloning the guru repo and copying my change there, but now I can't commit at all, even though it tries adding my signoff message:
Code:

~/Repositories/guru $ git commit --signoff
error: gpg failed to sign the data
fatal: failed to write commit object
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30905
Location: here

PostPosted: Thu Jan 27, 2022 9:44 am    Post subject: Reply with quote

Probably because you added
Code:
$ git config --local commit.gpgsign 1
$ git config --local push.gpgsign 1

in your git configuration
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
LemonadeLlama
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2021
Posts: 101
Location: New Zealand

PostPosted: Thu Jan 27, 2022 9:48 am    Post subject: Reply with quote

fedeliallalinea wrote:
Probably because you added
Code:
$ git config --local commit.gpgsign 1
$ git config --local push.gpgsign 1

in your git configuration


I did that because I was following this guide, at the request of someone in the pull request.

Should I remove that part of my config?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30905
Location: here

PostPosted: Thu Jan 27, 2022 9:54 am    Post subject: Reply with quote

LemonadeLlama wrote:
Should I remove that part of my config?

I'm not sure, but since the merge will be done by a developer with his gpg key I would say yes.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2718

PostPosted: Thu Jan 27, 2022 10:00 am    Post subject: Reply with quote

Code:
$ git config --local push.gpgsign 1
Note that github doesn't support push signing (only commit signing) so it's not usable for PRs, Gentoo's own git servers do use that though.

It's not necessary to use same configuration as GURU for PRs anyhow, can keep per-repo configs too.

fedeliallalinea wrote:
I think you don't need a gpg key because final merge is done by a developer and that need to be signed by a gpg key.
To add 'Signed-off-by: ' you should only add --signoff option to git or use repoman commit -m <message> that check also other problem on your commit.
Yep, this is right. A dev will review the changes (checking that it's sane and not tempered with), and then gpg sign it with their own key on merge, we don't really care whether the PR itself is gpg signed.

Not to be confused with the GCO signoff which is really just a text line in the summary to acknowledge GLEP76 and is unrelated to gpg (and we do need that, /could/ be skipped on trivial changes where you couldn't be listed as the author without it, but always having it reduces headaches).
Back to top
View user's profile Send private message
LemonadeLlama
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2021
Posts: 101
Location: New Zealand

PostPosted: Thu Jan 27, 2022 10:13 am    Post subject: Reply with quote

Performing the following allowed me to sign my commit:

Code:

git config --local commit.gpgsign 0
git config --local push.gpgsign 0


And yes, I was mixing up PGP keys and the GCO signoff :oops:
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21621

PostPosted: Thu Jan 27, 2022 3:55 pm    Post subject: Reply with quote

Would you consider this thread solved? If so, please edit the title of the opening post accordingly.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum