Githubへのpushでusername/passwordを省略する

接続の時に
ユーザ名とパスワードを毎回設定するのが煩わしいので
通信時に設定する事ができます

https://github.com/アカウント/レポジトリィ.git

の部分を

https://ユーザ名:パスワード@github.com/アカウント/レポジトリィ.git

https://username:password@github.com/username/repositorypass01

とすることで、自動で送信ができます

>remote add origin https://ユーザ名:パスワード@github.com/アカウント/レポジトリィ.git

とするのですが、一度、登録した場合にはエラーとなるため

一度、削除してから登録する必要があります

つまり

>remote rm origin

>remote add origin https://ユーザ名:パスワード@github.com/アカウント/レポジトリィ.git

となります

また、設定内容は、.git/configに設定されるため

>type .git/config

で内容の確認ができます

>echo next >> README.txt

>git add ./

>git commit -m ‘next’

>git push -u origin master