GIT ( https://github.com/ ) now supports SSH and it is a fabulous way for administrators to keep their server machines updated with latest code from code repositories.
Present Scenario : Whenever you do a git pull using http mechanism, you have to share your credentials. When there are multiple developers/administrators (which is generally the case now), it is nightmarish doing this.
SSH Scenario : This mechanism allows you to have a machine level access instead of user level, which is an excellent way to keep and maintain code on a typical server infrastructure.
Note : I find Gitbash extremely convenient when using git on windows.
You can download it from here GIT Download Windows
Present Scenario : Whenever you do a git pull using http mechanism, you have to share your credentials. When there are multiple developers/administrators (which is generally the case now), it is nightmarish doing this.
SSH Scenario : This mechanism allows you to have a machine level access instead of user level, which is an excellent way to keep and maintain code on a typical server infrastructure.
- Navigate to directory where you would like to clone git repository
- To generate a ssh certificate on your machine use the following command
ssh-keygen -t rsa -b 4096 -C "your_email@example.com" - Add key information generated earlier to ssh-agent using below commands
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa - Adding this new SSH key to your GitHub account
Copy rsa by using command clip < ~/.ssh/id_rsa.pub
Now navigate in browser to github account and click on Settings -> SSH and GPG keys.
Paste the copied key in the new key section. - From gitbash prompt add below command to fetch sources to local
git clone "git@github****/.git"
Be sure you use SSH url here and not the https. - and just do a git pull whenever you wish to pull the latest sources.
Note : I find Gitbash extremely convenient when using git on windows.
You can download it from here GIT Download Windows
No comments:
Post a Comment