バージョン管理と展開のための正しいキー設定のインポート

バージョン管理と展開のための正しいキー設定のインポート

OpenSSL 3の使用とM1 12.3からUbuntu 22.04への展開作業中

次の理由でアプリケーションがデプロイされていません。

Net::SSH::Authentication::KeyManagerError: the given identity is known, but the private key could not be loaded: 
OpenSSL::PKey::PKeyError (rsa#set_key= is incompatible with OpenSSL 3.0)

opt/homebrew/Cellarしたがって、12.3がインストールされているM1のローカルホームタイプにはOpenssl1.1のみが含まれていますbrew install openssl@3。ローカルに2つのバージョンが設定された潜在的なバナナの殻があります。

それでも上記のようなエラーが発生します。

数字~の源泉これは、正しく機能するために秘密鍵をPEM形式に変換する必要があることを意味します。

努力すれば成功することができます。キーをコピーすると、ssh をサーバーに接続できます。ssh-keygen -t rsa -C "[email protected]" -m PEMssh -T [email protected]ssh-copy-id deploy@server_ip

しかし、今M1を介してUbuntuに展開するときcap development deploy

00:00 git:check
      01 git ls-remote [email protected]:deploy/app_name.git HEAD
00:00 git:check
      01 git ls-remote [email protected]:deploy/app_name.git HEAD
      01 [email protected]: Permission denied (publickey).
      01 fatal: Could not read from remote repository.
      01
      01 Please make sure you have the correct access rights
      01 and the repository exists.

.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/sshkit-1.21.4/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as deploy@server_ip: git exit status: 128 (SSHKit::Runner::ExecuteError)
git stdout: Nothing written
git stderr: [email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

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

githubはリポジトリへのアクセスを拒否します。

完全性のために、以下が正しく機能しているようです。

git ls-remote [email protected]:deploy/app_name.git
c317346688eeb92d992a0a98db89719c83a574bd    HEAD
c317346688eeb92d992a0a98db89719c83a574bd    refs/heads/main

ここには非常に混乱している主要な灰色の領域があり、問題の明確な候補はありません。この展開を正しく実行するにはどうすればよいですか?

ベストアンサー1

おすすめ記事