Storing Git credentials when you can’t use SSH

posted by

Since you can’t proxy SSH traffic through Cloudflare without using a Zero Trust tunnel installed on both client and server, you need another way to authenticate yourself when using git and pushing changes to remotes located on homelab servers. You can manage this by storing the HTTPS authentication inside the .git directory of your project.

WARNING: This will allow anyone with access to your PC to push changes to your remote without using a password.

Open a terminal in your project directory and use the following command to store your authentication.

git config credential.helper store

Now, I know this isn’t exactly great from a security standpoint, but my local drive is encrypted, and I’m pretty careful with my habits, so I figure I don’t have a great deal to worry about. As for you, you’ll have to decide if this fits within your security needs or not.