Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Plugins
  1. OpenProject
  2. Forums
  3. Plugins
  4. git repository, unable to checkout

git repository, unable to checkout

Added by mark twain about 8 years ago

Hi there!

I am unable to correctly use the git integration of OP, hopefully someone here is able to help me.

I am running OP6.1, with the up-to-date docker container and all persistent directories needed, mounted to the correct location + an extra one, to be used as the repo directory.

Running on a computer within my LAN, which has a static IP and an entry within my hosts list:
cloud
pm.cloud

This works, stable since about a week (incl. reboots) .
The repo itself was initialized, does contain the .git folder and i committed my first changes within my LAN.

From within OP, i can see the files and commits of this repo, but i am unable to checkout as OP suggests me to (ok, as I am the admin, I told myself this, by setting the Checkout URL-Präfix to be https://pm.cloud/repos )

Cloning this repo via the link “https://pm.cloud/repos/project.git”
leads to:
t@wain:~/test$ git clone https://pm.cloud/repos/project.git/
Klone nach ‘project’ …
fatal: repository ‘https://pm.cloud/repos/project.git/’ not found

I am quite sure i muste have done something wrong, anyone got an idea what exactly? :)

BR!


Replies (7)

RE: git repository, unable to checkout - Added by Dennis Uckel about 8 years ago

Hi,

Perhaps I have the same problem.

I used the GIT URL https://[my-domain]/openproject/git/[my-projectname]/ (I mean with [my-projectname] the project name how it is spelled in OP) the whole last year.
Today I tried to push new changes, but the message is, it cannot be found. Neither Eclipse nor the GIT CLI client is able to find the repo. The error message is:

https://[my-domain]/openproject/git/[my-projectname]/info/refs?service=git-receive-pack not found

Log of the apache in front of openproject

192.168.x.y - - [24/Feb/2017:17:57:52 +0100] "GET /openproject/git/hanse/info/refs?service=git-receive-pack HTTP/1.0" 404 2132 "-" "JGit/4.1.1.201511131810-r"

But: in OpenProject, I can still review all commits and see the statistics. I noticed some changes in the apache config in the last recent updates, but I cannot determine which update. Perhaps this could be the reason.

My system is: Ubuntu 16.04.2, OpenProject CE 6.1.4

Btw: the mentioned link in the repository view like this: https://[my-domain]/openproject/git/[reponame].git/ never worked for me.

RE: git repository, unable to checkout - Added by Dennis Uckel about 8 years ago

I also tried to fetch the repo from the ruby server locally by git clone http://localhost:6000/openproject/git/[projectname]/, but the messages is still a http 404.

By the way @mark twain, the repositories are no extra plugins afaik. Perhaps you can move the topic into the general category…

RE: git repository, unable to checkout - Added by mark twain about 8 years ago

@Dennis_Uckel

I tried cloning the repo with the link you used, same results here … .

By the way mark twain, the repositories are no extra plugins afaik. Perhaps you can move the topic into the general category…@

Any hint on how to move a topic?

RE: git repository, unable to checkout - Added by mark twain about 8 years ago

Btw. https://community.openproject.com/topics/7158?board_id=6&r=7161#message-7161
indicates, this might related to some SSL stuff ?

As i said, OP was deployed using docker, served by nginx,, with let’s encrypt cert.
Anything one has to keep in mind here?

RE: git repository, unable to checkout - Added by Dennis Uckel about 8 years ago

Finally, I managed it. Pulling and Pushing is possible again.

Did a complete

openproject reconfigure

, like mentioned in the link. When it came to the question about the webserver, I didn’t skip, but answered the questionare again.

I think, the most important part is, that the file /etc/openproject/addons/apache2/includes/vhost/git_smart_http.conf was (re-)written. It handles all requests of the git part:

ProxyPass /openproject/git/ !

# see https://www.kernel.org/pub/software/scm/git/docs/git-http-backend.html for details
# needs mod_cgi to work -> a2enmod cgi
SetEnv GIT_PROJECT_ROOT "/var/db/openproject/git"

# Allow all repositories within the root to be exported
# depending on the authorization of OpenProject
SetEnv GIT_HTTP_EXPORT_ALL

# Set the remote user based on the redirect.
# If not set, receive-pack service will be disabled by default.
SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER

ScriptAlias /openproject/git/ "/usr/lib/git-core/git-http-backend/"

(...)

In your case it should be similar like this: /etc/openproject/addons/nginx/includes/vhost/git_smart_http.conf

My http configuration is like this:
—Internet—> Nginx Reverse Proxy with LE certificate —LAN—> Apache with its standard SSL certificate —Server internal—> OpenProjects Ruby-Server

RE: git repository, unable to checkout - Added by mark twain about 8 years ago

As
openproject reconfigure

is not an option for me (as I am using the docker container - correct me if i am wrong!) i tried to locate
git_smart_http.conf

Therefor, i ran the ‘docker bash’
sudo docker exec -it OpenP6.1 bash

sadly, i was unable to find the file.
+ There is neither a folder called /etc/openproject nor addon
rootb5b9424b28f2:/# ls
bin dev home lib64 mnt proc run srv tmp var
boot etc lib media opt root sbin sys usr
root@b5b9424b28f2:/# find . -name addon
root@b5b9424b28f2:/#
@

Or anything git related within /etc/apache2
rootb5b9424b28f2:/etc/apache2# find . -name git
root@b5b9424b28f2:/etc/apache2#
@

RE: git repository, unable to checkout - Added by Dennis Uckel about 8 years ago

Unfortunately I never used docker so far.

As far as I understood the tutorials and documentations I read, you’re right. You don’t have “openproject (re)configure”, because the configuration is part of the initial command line, if you create the image.

I don’t know which docker setup (or is “image” the right word!?) you use (I found several…), could you post the link to that, please? But nevertheless I have the feeling, that the docker is just providing the ruby/passenger part. The git http part is not handled by OP itself. Therefore I guess, you have to configure your nginx by your own.

Is git-http-backend installed on your server?

  • (1 - 7/7)
Loading...