Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.7k points)

I have run gitlabhq rails server on a virtual machine, following 1-6 steps from this tutorial https://github.com/gitlabhq/gitlab-recipes/blob/master/install/centos/README.md and starts rails server executing command sudo -u git -H bundle exec rails s -e production. After that I created user, using admin tools and created a new project under this user. Then I'm trying to push the existing project to this repo as always. But in the last step,  git push origin master fails with the error

[remote rejected] master -> master (pre-receive hook declined) 

Additional info:

1) I haven't activated user (project owner) via email activation link, because I haven't configured post service on server-side and I didn't find instructions how to do that in this manual.

2) Gitlab server generates tips how to push project to repo and there is not repositories/ in path. I mean it generates git@mygitlabhost:user/repo.git instead of git@mygitlabhost:repositories/user/repo.git which is correct.

3) When i tried to debug it, I opened pre-receive script inside repo on server and tried to output variables (there is 3 of them): refs = ARGF.read, key_id  = ENV['GL_ID'] and repo_path = Dir.pwd and found, that key_id is always empty. Maybe the problem is here... If so, please give me suggestions on how to fix that. Thanks

1 Answer

+1 vote
by (62.9k points)

Seems the matter is with some services, like sidekiq.

Running sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production outputs all the issues with config.

Read this blog on git commands to learn about frequently used commands in Git.

Related questions

+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer
asked Oct 5, 2019 in DevOps and Agile by Abhishek_31 (12.7k points)

Browse Categories

...