Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are git push and pulls encrypted?

You have credentials to prevent unauthorized access to your git repository server (or for github,bitbucket), but this simply prevents someone from performing pull,push,etc without proper authorization.

However is the content of the pull, push, etc encrypted in any way to prevent someone from sniffing packets and obtaining sensitive code from your repository? If it exists how can you enable it?

like image 909
Radu Ionescu Avatar asked Feb 11 '16 10:02

Radu Ionescu


2 Answers

Git use several protocols. Read more about it here: https://git-scm.com/book/ch4-1.html.

SSH is a secured protocol so you can use it.
As you can see the last step before transferring the content is the encryption and vice versa. enter image description here


enter image description here

like image 194
CodeWizard Avatar answered Oct 25 '22 10:10

CodeWizard


Git can communicate using a number of different network protocols - HTTP, HTTPS, SSH and Git's own protocol. HTTPS and SSH provide encryption while HTTP and the Git protocol do not. Most well known Git providers such as GitHub use HTTPS and are therefore encrypted. If you are setting up an internal environment, the full instructions for implementing HTTPS or SSH can be found here:

https://git-scm.com/book/en/v2/Git-on-the-Server-Getting-Git-on-a-Server

like image 43
Stefan Avatar answered Oct 25 '22 11:10

Stefan