Content
Can't clone managed repository [SOLVED]
Added by Jason Stubbs over 7 years ago
Hi,
Repository cloning, etc was working at some stage, but now all I get is:
$ git clone https://my.domain/git/myproject.git Cloning into 'myproject'... fatal: repository 'https://my.domain/git/myproject.git/' not found
The only thing I can think of that I’ve done on the server is to enable https using certbot (https://certbot.eff.org/)
I’ve tried disabling the http -> https redirect, but no luck on http either.
/var/log/openproject/production.log doesn’t provide any help:
F, [2017-01-24T01:47:02.657524 #12568] FATAL -- : F, [2017-01-24T01:47:02.658161 #12568] FATAL -- : ActionController::RoutingError (No route matches [GET] "/git/myproject.git/info/refs"): F, [2017-01-24T01:47:02.658198 #12568] FATAL -- :
selinux isn’t getting in the way, as I had to semanage fcontext -a -t httpd_sys_rw_content_t "/var/db/openproject(/.*)?"
to get it working in the first place, and audit.log doesn’t report any issues.
OpenProject is installed via yum (https://www.openproject.org/open-source/download/packaged-installation-guide/) and is currently at 6.1.4.
I don’t know much ruby, but haven’t even been able to find where /git/ handling is meant to be done to trace why it isn’t working. Any pointers on how to figure out what’s going on?
I’ve been searching for a few hours now and am starting to tear (what’s left of my) hair out!
Cheers,
Jason Stubbs
Replies (2)
Hi Jason,
given your
production.log
I assume that Apache doesn’t properly handle the/git/(..)
requests, that’s why they’re being forwarded through the proxy when they shouldn’t.The Apache configuration at the path (depending on your distro)
/etc/apache/(sites-enabled|vhosts.d)/openproject.conf
includes several config files from the packaged installation. One of them is the git integration at/etc/openproject/addons/apache/includes/vhost/git_smart_http.conf
, which sets up/git
to not pass through the proxy and instead be handled by apache.Could you check the configuration file, apache access and error logs for anything suspicious?
Best,
Oliver
Hi Oliver,
Thanks for your reply. It was a nudge in the right direction and I’ve got it all working now.
I can’t remember when or why, but at some stage I did a
openproject reconfigure
and skipped past some things, assuming that the current configuration would be kept whereas skipping actually removed the configuration files for those components.After redoing the configuration, using openproject’s ssl settings and removing letsencrypt’s settings, everything almost worked. The only other change I had to make was to label
/var/db/openproject(/.*)?
withgit_rw_content_t
.Anyway, all good now. Thanks!
Regards,
Jason Stubbs