I.はじめに:
Windows コンピュータ システムを再インストールし、公式 Web サイトにアクセスして最新の git インストールをダウンロードし、次に一番下まで進み、bash を開いて、公開キーを生成する古い方法を設定します。
git config --global user.name "yourname"
git config --global user.email "[email protected]"
ssh-keygen -t rsa -C "[email protected]"
公開キーを Alibaba Cloud に追加します。コードのクローンを作成するときに、コードをプルダウンできず、エラーが報告されます。
Unable to negotiate with **** port 22: no matching host key type found. Their offer: ssh-rsa
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
開発者権限があることを確認してください。公開キーをリセットして追加しても機能しません。オンラインにアクセスして方法を見つけてください。その理由は、新しい ssh クライアントが ssh-rsa アルゴリズムをサポートしていないためです。ローカル設定を変更し、再度 ssh-rsa を使用します。
画像.png
2. 解決策:
具体的な方法: 現在のユーザー ディレクトリの .ssh ファイルに構成ファイルを作成し (config にはサフィックスがありません)、メモ帳で開き、次のコードを追加します。
Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa