Git skip https auth

Environment

Explanation

How to skip authiorization when we access remote repository via https
Example:

root@kali:~/1n4r1.github.io# git push origin git-skip-auth
Username for 'https://github.com': 1n4r1
Password for 'https://1n4r1@github.com': 

Solution

We can use git-credential.
Since I’m using Kali, I can not use any authentication procedure of OS.
So I have to store my credential in local directory.

git config --global credential.helper store

We have to login with username/password one time after this command.
Then, the auth data will be stored here

root@kali:~# cat .git-credentials 
https://1n4r1:SuperStrongFakePassword!!@github.com
root@kali:~#

Now, we don’t have to put credentials any more.