git pushコマンドのユーザー名とパスワード 質問する

git pushコマンドのユーザー名とパスワード 質問する

コマンドでユーザー名とパスワードを指定して、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.gitorigingit push origin --all

のその他のオプションを表示するにはgit pushgit help push

おすすめ記事