6

プロジェクト インターフェースの [Click to Deploy] を使用して、GitLab を Google Compute Engine にインストールしました。デプロイは数分後に成功します。インスタンスに SSH 接続して、期待どおりにいじることができます。

Web インターフェイスを使用して GitLab にログインし、SSH キーをプロファイルに追加することもできます。ここまでは順調ですね。ただし、新しいサンプル リポジトリにプッシュまたはプルしようとすると、次のメッセージが表示されます。

Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

干渉しないように、ローカルの SSH 構成を削除しました。ある種の SSH トンネルをセットアップする必要がありますか? 私は何が欠けていますか?

更新:ローカルの ~/.ssh フォルダーを消去し、SSH キー (GitLab のプロファイルに追加したもの) を再生成すると、次のエラーが発生します。

Received disconnect from {GITLAB_IP_ADDRESS}: 2: Too many authentication failures for git
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

更新 2: GitLab には既に解決策があるようです: run sudo gitlab-ctl reconfigure。ここを参照してください: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#git-ssh-access-stops-working-on-selinux-enabled-systems

4

3 に答える 3

3

解決しました!これを理解してくれた@sxleixer@Alexander Wenzowskiに感謝します。

どうやら、SELinux が .ssh ディレクトリの非標準の場所に干渉していたようです。Compute Engine インスタンスで次のコマンドを実行する必要がありました。

sudo yum -y install policycoreutils-python # Install the `semanage` tool
sudo semanage fcontext -a -t ssh_home_t "/var/opt/gitlab/.ssh/authorized_keys" # Allow the nonstandard ssh_home_t

ここで完全なスレッドを参照してください。

Google クラウド エンジン。許可が拒否されました (publickey、gssapi-keyex、gssapi-with-mic)

更新: GitLab には既に解決策があるようです: run sudo gitlab-ctl reconfigure。ここを参照してください: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#git-ssh-access-stops-working-on-selinux-enabled-systems

于 2014-10-23T17:26:32.970 に答える