Skip to content

Instantly share code, notes, and snippets.

@juemura
Last active September 12, 2023 09:40
Show Gist options
  • Save juemura/899241d73cf719de7f540fc68071bd7d to your computer and use it in GitHub Desktop.
Save juemura/899241d73cf719de7f540fc68071bd7d to your computer and use it in GitHub Desktop.
Tutorial: How to connect your Cloud9 and GitHub accounts via ssh

#Tutorial: How to connect your Cloud9 and GitHub accounts via ssh

To avoid having to enter your username and password EVERY-SINGLE-TIME you push, follow these step-by-step instructions.


#####1. Copy your C9 ssh key. Go to https://c9.io/account/ssh and copy the key below *"Connect to your private git repository"*. It's a very long string that starts with ssh-rsa and ends with your email.

#####2. Paste your C9 ssh key into your GitHub account Go to https://github.com/settings/keys and click New SSH key. Enter a title (a name like Cloud9 is fine), paste the ssh key that you copied in the previous step, and click Add SSH key

#####3. When creating a remote, make sure you "clone with SSH" instead of "clone with HTTPS" This means that, when you type in git remote add origin, you should use a link that looks like this: *git@github.com:*YOUR_USER_NAME/YOUR_REPO_NAME.git. Pay attention to how that differs from *https://github.com/*YOUR_USER_NAME/YOUR_REPO_NAME.git While the first creates a remote that uses ssh authentication, the latter uses https, so it'll always prompt you to enter your username and password to authenticate the connection.


That's it! Next time you push anything, it should authenticate automatically, and you'll never again have to enter your credentials on C9.
@bijit85
Copy link

bijit85 commented Apr 21, 2021

Thank you. This was really helpful.

@zachliu
Copy link

zachliu commented Jun 17, 2022

@brycepaquette
Copy link

Thank you!!! still works except the cloud9 link doesn't bring me to the right place FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment