コマンドでユーザー名とパスワードを指定して、git リポジトリをクローンすることができます。例:
git clone https://username:[email protected]/file.git
プッシュ時にユーザー名とパスワードも指定できますか? たとえば、実行するgit push origin --all
とパスワードを求める出力が表示されます。これを 1 つのコマンドで実行したいです。
(キーやその他のソリューションを設定する機能は知っていますが、ユーザー名とパスワードを 1 つのコマンドで使い続ける方法があるかどうかを知りたいです。) Windows 8.1 で Git Bash を実行しています。
ベストアンサー1
はい、できます
git push https://username:[email protected]/file.git --all
この場合は、https://username:[email protected]/file.git
origin
git push origin --all
のその他のオプションを表示するにはgit push
、git help push