Project

General

Profile

Git-repositories are not found

Added by Elvys Melo Duarte Almeida over 7 years ago

Hello everybody,

like written in the subject I'm trying to clone existing repositories from the server (debian) to client (win7).

My aim is to update our ticket system - at the moment redmine 1.0 - to a more modern one.
Unfortunately the person who installed the first version left the company and I have very little experience in apache2 and in ruby, so if you write an answer it could take longer until I answer because I have to understand what you are talking about - I also use this thread to get more experience with the topic.

A resume of my steps:
  1. Using various wikis I installed redmine2.0 on a debian8 server.
    • I used Apache2 as server and passenger as rack
  2. I migrate the content of the mysql database of redmine1.0 to redmine 2.0 using
    bundle exec rake db:migrate RAILS_ENV=production
  3. I installed redmine3.3 parallelly to redmine2.0 and migrate the content of the mysql database of redmine2 to the newer one
  4. I did some short tests and I confirmed that
    • there were no problem to login in redmine via ldap
    • the content of the wikis are shown well
    • the tickets are related to the right project and the right version
  5. I installed the plug-in redmine-scm
    • To make it work the ruby-gem rails-observers was installed
  6. I copied the all repository from the 'old' server to /data/git/repos/ using scp
  7. The owner of the /data/ were changed recursively to www-data:www-data
  8. I copied the file scm.yml to [redmine dir]/config View details of scm.yml
  9. I copied the original pre- and post- scripts to /data/git/.redmine-scripts
  10. I edited the apache2.conf to give apache the access to the target folder Inserted lines
  11. I inserted a new configuration file in apache named git.conf Content of git.conf
  12. I enabled the configuration using a2enconf

I created a sandbox project and I created successfully a dummy project.
But when I try to clone a repo from a client I have to authenticate myself and then I get the message

fatal: repository 'http://10.12.1.110/git/sandbox.git/' not found

Because I have to authenticate myself I suppose the config-file works well but I just can't figure out why the repository is not found.
I tried to understand the several logs (e.g. apache-error.log, production.log) but I don't get point.

I did these test:
  1. I cloned from the server to a test-directory in home giving the absolute path to the repository and it worked.
  2. I cloned from the client and I gave wrong longin data and an error 500 was returned.

Now I spend more than 7 hours trying to fix the problem, but I think I reached the point where my good friend 'google' doesn't help anymore (or I don't know the right terms for solving the problem) -

If you have any ideas, I'd appreciate any help.

Thanks

Elvys


Replies (1)

RE: Git-repositories are not found - Added by Elvys Melo Duarte Almeida over 7 years ago

Hello everybody,

I found the solution for the problem described above in https://git-scm.com/book/en/v2/Git-on-the-Server-Smart-HTTP

Using the line

a2enmod cgi alias env rewrite

I discovered the the mod alias was not enabled, so the ScriptAlias didn't work.

I hope this information may be useful.

Best regards

Elvys

    (1-1/1)