以前に尋ねた質問をいくつか開いていますが、今では問題は にかなり関連しているよう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