Skip to content
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

nixos/gogs: allow git operations over ssh #38065

Closed
wants to merge 1 commit into from
Closed

Conversation

Ekleog
Copy link
Member

@Ekleog Ekleog commented Mar 29, 2018

Without ROOT_PATH set, gogs serv tries to open logs in writing in its store directory. This blocks cloning or pushing over ssh, and results in a gogs internal error.

I've tested the workaround on 18.03 with

{
  service.gogs.extraConfig = ''
    [log]
    ROOT_PATH = /var/lib/gogs/log
  '';
}

@bjornfor
Copy link
Contributor

+1 for adding your PR message to the commit message, because it contains valuable context (the why part).

Do you know if a similar fix is needed for gitea?

Without `ROOT_PATH` set, `gogs serv` tries to open logs in writing in
its store directory. This blocks cloning or pushing over ssh, and
results in a gogs internal error.
@Ekleog
Copy link
Member Author

Ekleog commented Mar 29, 2018

Context added to the commit message, thanks :)

About gitea, I unfortunately have absolutely no idea, but when looking for it I came upon fa76c9a , last commit to gitea. This PR doesn't in addition add the useDefaultShell (because gogs already enforces bash), and doesn't add the additional configuration options (mostly because I'm currently in a time-constrained state and this is enough to get things working, so it's already better than before).

Also, given how similar the two modules look to me (gitea looks like almost a copy-paste of gogs, with “gogs” changed to “gitea” and a few added options, mostly postgresql and ), I'm thinking it'd be better to delete one of the two (likely gitea, as it wasn't there in 17.09) before 18.03 stable, and merge the two modules together, so that we don't have to fix twice the same bugs? poke @disassembler as you introduced the gitea module.

@bjornfor bjornfor changed the title gogs module: allow git operations over ssh nixos/gogs: allow git operations over ssh Mar 30, 2018
@bjornfor
Copy link
Contributor

Applied to master (b59570e). Thanks.

@bjornfor bjornfor closed this Mar 30, 2018
@Ekleog Ekleog deleted the gogs-ssh branch March 30, 2018 16:21
@Ekleog
Copy link
Member Author

Ekleog commented Mar 30, 2018

Thank you!

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Jun 12, 2018

This should be backported to 18.03. I spent quite some time on figuring out why gogs was throwing internal errors on ssh.

@bjornfor
Copy link
Contributor

Backported to release-18.03: 0cdd824.

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Jun 13, 2018

@bjornfor thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants