-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
documentation: explain how/where to add GPG within official Docker container #10682
Comments
It's very difficult to say how best to do this. We're very happy to link or offer advice if there is a good suggestion but giving out bad advice would probably be worse than giving out no advice |
Isn't giving no advice the same like giving a bad advice? Because if people don't even know what configurations are considered bad, they definitely will configure the way it is considered bad. 😉 Also obviously, I wasn't asking about documenting a bad advice at here. 😉 From a user perspective it would be nice, just having to add a read-only mount (i.e. But I guess it is not as easy as that… |
It's only their key they're exposing. If we give bad advice - we're exposing everyone's key. I'm sure docker must have some secure way of passing secrets and some way of interfacing to a gpg_agent. I just don't know and haven't used these systems. If you know better and have a good idea for your to do it in a basic way - especially if you know a way of increasing the security say by using a tpm'd or credit-card key - then by all means write the suggestion and a pr. At the moment we dodge this all by saying: Installing and generating a GPG key for GiteaIt is up to a server administrator to determine how best to install a signing key. Gitea generates all its commits using the server git command at present - and therefore the server gpg will be used for signing (if configured.) Administrators should review best-practices for gpg - in particular it is probably advisable to only install a signing secret subkey without the master signing and certifying secret key. |
Which is exactly why I was writing
So is the Gitea implementation relying on a running If so, there's the possibility to either mount it from outside (variant A)) or use one from inside the container (variant B)), regarding this blog post. But in that case it is probably better to add a running So the mentioned variant B) of the blog post is probably a safer variant. It obviously should not mount the I don't see anything Maybe having a dedicated mount point and an easy solution for adding a key (i.e. an But I'm definitely not an expert regarding this topic either (this is why I opened this issue in the first place). EDIT:
|
This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions. |
Stalebot, please! Close this only if you are going to document it by yourself. 😉 |
Sorry @alexanderadam I forgot about marking this issue confirmed. We still need this guide... It might be simplest to put things in comments here, a gist or even start a PR. If we have a PR we should try to refrain from general comments - but rather use githubs suggestion syntax or provide diffs to try to fix things directly so that the PR doesn't descend too much into bikeshedding. My thoughts:
|
sorry to bother everyone here, but I've been looking for about an hour and I can't find any helpful guide as I'm really a noob when it comes to GPG, and as said here there is nothing realy helpful in the doc to set it up. I'm working on my own on a gitea protected by other means and don't care about signing in any way other than it prevents me from using the pull requests. I even feel gpg might not really be mandatory to use PR but somehow it seem gitea wants it... So giving a little help in setting it up even with a few warning saying one having concerns about code signing and security should not even follow the guide would actually still be helpfull to all those who don't really care but for which it goes just in their way.. Not sure my tone came out right, there is no bad intentions or reproaches from me here, only lots of love for the kind work everyone here makes available, just with a bit of frustration added in by my not finding a way to test PR in gitea for now, but that'll pass ;) |
I've been going though the docs. I'm at the stage the git user's gpg has signing keys, git is configured to use it though the configs, but there is no indication of Gitea as to if their signed or not. As far as I can tell this isn't working. Just pulled a new repo via git onto my local machine, and there's no signature for the initial commit, so Gitea's signing is definitely not working for me. |
I got this working with some help from delvh on matrix. He pointed me to this: https://blog.gitea.io/2022/07/gitea-1.17.0-is-released/#-internal-gitconfig-19732httpsgithubcomgo-giteagiteapull19732 This is in fact stated in documentation as well: https://docs.gitea.com/next/administration/signing#signing_key (Since 1.17,...) You must have the correct .gitconfig and .gnupg in this new home directory (/var/lib/gitea/home inside the container). I think the documentation is sufficient, it just wasn't immediately clear what it's about, so I simply missed it. Also, if you are running gpg command from within the container like I did, under the default user, whose home directory is in fact /var/lib/gitea/git, make sure to specify I will add that I run the rootless version of the container and I cannot say how it works in the other version. |
I just spent a couple hours trying to set my instance up so that actions performed in th gui would be signed. It did not work. I feel like the only documentation we have is this single paragraph. It was very frustrating without even achieving anything. Also, some points on the topic:
|
Description
Currently the documentation regarding GPG integration/Commit signing is good but as far as I can see, there is no explanation how to integrate a key within the official Docker container. Or am I missing something?
The text was updated successfully, but these errors were encountered: