निरंजन
Some commands ask for arguments (or values) after the first step. eg.
```
git push origin master
```
Asks for username and then password. It is almost always the same.
```
git config --global user.name
git config --global user.email
```
Helps some times, but we still need to type the password.
I was trying to find a way to do this automatically. I wrote something like this -
```
#!/bin/bash
git add -A
git commit -m "$1"
git push origin master
```
This adds all the changes in the files and gives a commit message, but it asks me username and password which is always the same. I want to provide it automatically. Is there any way to anticipate the future queries and writing down there values in the code itself. I tried this -
```
#!/bin/bash
git add -A
git commit -m "$1"
git push origin master
Username for 'https://github.com': NiranjanTambe
Password for 'https://NiranjanTambe@github.com':mypassword
```
but this doesn't work.
Top Answer
Anonymous 1514
Instead of using password you should be using a ssh key. Refer to [add ssh key to your github account](https://docs.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account)