How does GIT SSH work in corporate
Suppose you have a gitlab account. and you have a repo in there. you wanna clone it in your remote, cloud based virtual machine. How do you do that?
Gitlab needs to know you have the permission to do so. So, instead of typing out your username and password everytime you type in any git commands in the terminal, we use SSH keys.
SSH key is a pair of cryptographically linked text files:
1. private key: never share this. stays hidden in your VM.
2. public key: you upload this to your gitlab account
When your VM tries to pull code from GitLab, GitLab issues a cryptographic challenge that can only be solved if you hold the matching Private Key. Since you do, GitLab grants access instantly.
Heres how to do this:
- you use the ssh-keygen command.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home