1
votes

Below is my configuration:

config/gitlab.yml
gitlab: host: 192.168.5.165
port: 8001

config/database.yml

username: gitlab
password: "xxxxx"

gitlab-shell/config.yml:

gitlab_url: "http://192.168.5.165:8001/"

/etc/nginx/sites-available/gitlab:

listen 192.168.5.165:8001;

server_name 192.168.5.165;

when I creat a new project, and push from the command,I got errors:

alex@ubuntu:~/gitlabProjects/test$ git remote add origin [email protected]:alex/test.git alex@ubuntu:~/gitlabProjects/test$ git push -u origin master fatal: '/home/git/repositories/alex/test.git' does not appear to be a git repository fatal: The remote end hung up unexpectedly

Then I tried another way ,I got the error:

alex@ubuntu:~/gitlabProjects/test$ git remote add test [email protected]:8001:alex/test.git alex@ubuntu:~/gitlabProjects/test$ git push -u test master Access denied.

I am sure that my public key is ok. I really can not solve this problem.

/home/git/gitlab$ sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production Checking Environment ...

Git configured for git user? ... yes Has python2? ... yes python2 is supported version? ... yes

Checking Environment ... Finished

Checking GitLab Shell ...

GitLab Shell version >= 1.7.0 ? ... OK (1.7.0) Repo base directory exists? ... yes Repo base directory is a symlink? ... no Repo base owned by git:git? ... yes Repo base access is drwxrws---? ... yes post-receive hook up-to-date? ... yes post-receive hooks in repos are links: ... alex / write-clean-code ... ok alex / HelloGitlab ... ok alex / Test ... ok

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes

Checking Sidekiq ... Finished

Checking GitLab ...

Database config exists? ... yes Database is SQLite ... no All migrations up? ... yes GitLab config exists? ... yes GitLab config outdated? ... no Log directory writable? ... yes Tmp directory writable? ... yes Init script exists? ... yes Init script up-to-date? ... yes Projects have satellites? ... alex / write-clean-code ... yes alex / HelloGitlab ... yes alex / Test ... yes Redis version >= 2.0.0? ... yes Your git bin path is "/usr/bin/git" Git version >= 1.7.10 ? ... yes (1.8.4)

Checking GitLab ... Finished

1
Did you use the path that gitlab returns for that repository after creating it?Femaref
Thanks for your replay.I did use the url that the gitlab returned which was [email protected]:alex/test.git.alex
What do the checks say? Is sidekiq running?Razer
All the items are green.alex

1 Answers

0
votes

I believe this is what you want to do with your Github repository...

  • First perform a cleanup by uncommitting your previous changes
  • To reset your current HEAD to the specified state you can use following command, Try this

    git reset --hard origin/master