$ git config credential.helper store
$ git push https://github.com/owner/repo.git
Username for 'https://github.com': <USERNAME>
Password for 'https://[email protected]': <PASSWORD>
$ git config --global user.name <Your name here>
$ git config --global user.email <[email protected]>
cd ~/.ssh
touch config
nano config
Use whatever text editor if you don't like nano.
# Github <User> account
Host github.com-<User"
HostName github.com
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/GitHub/<User"/id_rsa
AddKeysToAgent yes
# Github <User2> account
Host github.com-<User2>
HostName github.com
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/GitHub/<User2>/id_rsa
AddKeysToAgent yes
# GitLab <User> account
Host gitlab.com/<User"
HostName gitlab.com
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/GitLab/<User"/id_rsa
AddKeysToAgent yes
# GitLab <User2> account
Host gitlab.com/<User2>
HostName gitlab.com
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/GitLab/<User2>/id_rsa
AddKeysToAgent yes
can i copy the above and paste it into bash if so how?