DEV Community

Cover image for How to use Deploy Keys on GitHub?
SyedAsadRazaDevops
SyedAsadRazaDevops

Posted on • Edited on

1

How to use Deploy Keys on GitHub?

Have you ever noticed a menu, deep down inside the GitHub settings, called Deploy Key and wondered what that was for?

Well, today you'll finally know what that is for and how to use Deploy Keys in GitHub.

Configuring multiple SSH Deploy Keys on GitHub from one server. I wanted to use Deploy Keys on GitHub. Deploy Keys are pretty much read-only keys for your repositories. They can be found by going to your

Image description

I find them to be best practice for getting your code on your prod server as these only allow for servers to clone the code and not write to the repositories.

First create SSH KEY on server or using laptop where you deployed on, then go to repository I needed to clone onto my server, I then added the id_rsa.pub keys into the previously mentioned Deploy Key settings in repositories on GitHub.

PROS

  • Anyone with repo and server access an deploy.

  • No need to change local SSH setting.

  • Read-only by default, possible to give full access.

CONS

  • Grand access to a single repo.

  • Not protected by passphrase.

THANK YOU!

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay