以前に尋ねた質問をいくつか開いていますが、今では問題は にかなり関連しているようsshです。
- に Gitlab をインストールしました
/home/myuser/gitlab。 - 担当者を作りました
test - 指示に従って、リモートを追加しました
git@localhost:root/testing.git(Gitlabのサーバーはポート3000で実行されます)
今、プッシュしようとすると、次のエラー メッセージが表示されます。
$ git push -u origin master
ssh: Could not resolve hostname mylocalhost: nodename nor servname provided, or not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ここで、ssh 接続に問題があることがわかりました。ここに私の/home/myhome/.ssh/configファイルがあります
Host mylocalhost
Hostname localhost
PORT 3000
User git
IdentityFile /home/myuser/.ssh/id_rsa.pub
実行するssh mylocalhostと、このメッセージが表示されます
ssh_exchange_identification: Connection closed by remote host
詳細モードでは、正しいポートで接続が確立されているように見えますが、ここでプロセスが失敗しますdebug1: ssh_exchange_identification: HTTP/1.1 400 Bad Request。私は/System/Library/LaunchDaemons/ssh.plist(私が使用してOSXいる)ポートをリッスンして転送するように更新しようとしまし3000たが、Gitlab Webrick Railsサーバーはもう実行されません。Lは変えようとしたgit remote set-url origin mylocalhost:testing.git