SSH Returns "301 Moved Permanently" and Git Push Returns Errors
Created by: a2
$ ssh [email protected]
PTY allocation request failed on channel 0
(JSON::ParserError)1.9.1/json/common.rb:148:in `parse': 743: unexpected token at '<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
'
from /usr/local/lib/ruby/1.9.1/json/common.rb:148:in `parse'
from /home/git/gitlab-shell/lib/gitlab_net.rb:24:in `discover'
from /home/git/gitlab-shell/lib/gitlab_shell.rb:28:in `exec'
from /home/git/gitlab-shell/bin/gitlab-shell:16:in `<main>'
Connection to server.tld closed.
$ git push
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
$ sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
System information
System: Ubuntu 12.04
Current User: git
Using RVM: no
Ruby Version: 1.9.3p327
Gem Version: 1.8.23
Bundler Version:1.3.5
Rake Version: 10.0.3
GitLab information
Version: 5.0.1
Revision: 0702bd6
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: http://server.tld
HTTP Clone URL: http://server.tld/some-project.git
SSH Clone URL: [email protected]:some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 1.1.0
Repositories: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/bin/git