I managed to make git work for pull and push over http. Now the last step it getting around the git push asking twice for my password. I don't want to use the .netrc file. any idea ? thanks
If Git prompts you for a username and password every time you try to interact with GitHub, you're probably using the HTTPS clone URL for your repository. Using an HTTPS remote URL has some advantages compared with using SSH. It's easier to set up than SSH, and usually works through strict firewalls and proxies.
Generating a new Personal Access Token Provide the required permissions and create the access token. Copy this access token and Save it for future use. Now when trying to Authenticate with Git from the Bash, provide the Personal Access Token generated instead of the Password.
If server detects a conflict when someone pushes data (and if two users are doing this "simultaneously" one of the pushes will be conflicting, because it will be applied only after the other one completes), the server will reject it, and the unlucky user shall then resolve conflicts and try to push again.
Git Askpass for Windows (Askpass) provides secure Git credential storage for Windows. Askpass provides multi-factor authentication support for Azure DevOps, Team Foundation Server, and GitHub.
Update: There's a better solution in git now, which I described in answer to this other question:
I've kept the old answer I wrote below for reference.
If you don't want to use .netrc
, another option is to specify your username and password in the URL that your remote refers to, e.g. if your origin
remote is:
http://some.server/whatever.git
... you could change it to http://myusername:[email protected]/whatever.git
with the following command:
git remote set-url origin http://myusername:[email protected]/whatever.git
... and you won't need to enter your password manually. This does mean that your password will be stored in plain text in your .git/config
file, however. If this is a problem, you're better off using public key based authentication with SSH.
What about you make an ssh connection without password to the git server? Ssh connection without password
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With