Windows用のGitを使う

Git をgit bash でのみ使うように設定し、SSH 認証を使う場合、Git はHOME 環境が指すディレクトリで SSH 鍵を探します。この変数は常にgit bash によって設定されます。

しかし、この変数は通常Windowsのコマンド・プロンプトでは設定されません。Windowsのコマンド・プロンプトからGitを実行すると、インストール・ディレクトリでSSH鍵を探すので、認証に失敗します。

環境変数HOME は、Qt Creator から設定することができます。Preferences >Version Control >Git と進み、Set "HOME" environment variable を選択してください。HOME は、Gitの実行ファイルが実行されたときに%HOMEDRIVE%%HOMEPATH% に設定され、認証はgit bash と同様に機能します。

バージョン管理環境設定のGitタブ

参照 :How to:Gitの使い方ファイルの比較バージョン管理システムのセットアップバージョン管理システムも参照してください。

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.