Username and password in command for git push Username and password in command for git push git git

Username and password in command for git push


Yes, you can do

git push https://username:password@myrepository.biz/file.git --all

in this case https://username:password@myrepository.biz/file.git replace the origin in git push origin --all

To see more options for git push, try git help push


I used below format

git push https://username:password@myrepository.biz/file.git --all

and if your password or username contain @ replace it with %40


For anyone having issues with passwords with special chars just omit the password and it will prompt you for it:

git push https://YOUR_GIT_USERNAME@github.com/YOUR_GIT_USERNAME/yourGitFileName.git