我有一个新版本的gitlab与nginx安装。 我可以访问前端没有问题,我可以创build用户/添加键,并创build项目。 创build我的第一个项目后,我试图按照项目页面上的指示,但我不断收到此错误。 我检查了所有的日志,找不到任何相关的东西:
git push -u origin master
回报
/home/git/gitlab-shell/lib/gitlab_net.rb:71:in `get': undefined method `request_uri' for #<URI::Generic:0x00000001ca76b8> (NoMethodError) from /home/git/gitlab-shell/lib/gitlab_net.rb:31:in `allowed?' from /home/git/gitlab-shell/lib/gitlab_shell.rb:59:in `validate_access' from /home/git/gitlab-shell/lib/gitlab_shell.rb:23:in `exec' from /home/git/gitlab-shell/bin/gitlab-shell:16:in `<main>' fatal: Could not read from remote repository. Please make sure you have the correct access rights
并存在该存储库。
根据我在网上find的其他帮助,我试了一下:
ssh git@myhost
并得到:
PTY allocation request failed on channel 0 /home/git/gitlab-shell/lib/gitlab_net.rb:71:in `get': undefined method `request_uri' for # <URI::Generic:0x00000002a60d40> (NoMethodError) from /home/git/gitlab-shell/lib/gitlab_net.rb:38:in `discover' from /home/git/gitlab-shell/lib/gitlab_shell.rb:77:in `user' from /home/git/gitlab-shell/lib/gitlab_shell.rb:82:in `username' from /home/git/gitlab-shell/lib/gitlab_shell.rb:36:in `exec' from /home/git/gitlab-shell/bin/gitlab-shell:16:in `<main>' Connection to [ip_addr] closed.
经过几天的搜索后,我终于尝试了两件事,问题得到解决:
尝试一个<= Git-1.8.4的git版本,
因为在使用https的时候好像新版本在推送时可能会有问题。