You may have noticed that it seems a little tedious entering username and password every time you tell the git
command to talk to GitHub.
One solution here is to configure Git to cache these credentials:
git config --global credential.helper cache git config --global credential.helper 'cache --timeout=3600'
An even better idea is to generate an SSH key and add it to your account on GitHub. This will enable you to clone repositories from paths like so:
[email protected]:username/repo.git
Instead of:
https://github.com/username/repo.git
...and is almost certain to be more secure than authenticating with a password.
There's a nice GitHub guide on generating SSH keys, and their recommendations are, for the most part, fairly sound. Be aware that you'll probably need to change repositories you've already cloned to use the SSH URL in order to take advantage of this.
GitHub documentation repeatedly recommends use of HTTPS URLs over SSH. This is very likely just because the HTTPS approach is less work for users and easier to explain.
Page last edited July 14, 2015
Text editor powered by tinymce.