Skip to content

Instantly share code, notes, and snippets.

@jboulhous
Created July 16, 2013 11:37
Show Gist options
  • Star 22 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save jboulhous/6007980 to your computer and use it in GitHub Desktop.
Save jboulhous/6007980 to your computer and use it in GitHub Desktop.
Push to github from cloud9

Add a git remote in the Cloud9 console. Should look like this (replace the git url with your repo url):

git remote add origin git@github.com:C9Support/testPush.git 

Add files and commit them:

git add . 
git commit -m "First commit"

Push to github:

git push -u origin master
@Kaharo
Copy link

Kaharo commented Sep 6, 2016

I received an error and I cannot find the proper way to fix this (from clou9ide project to existing empty github repo)

Warning: Permanently added 'github.com,MyIP' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

@dannytech
Copy link

This is very common, and simply means Github is denying the request because your IDE is not authorized. To fix this, go to https://c9.io/account/ssh, copy the key, go to https://github.com/settings/keys, click "New SSH Key," give it a name like "Cloud9," paste the key, and save it. Then try to do what was recommended, and it should work.

@mftaff
Copy link

mftaff commented Feb 9, 2017

@dannytech Thanks!
Simple, clear instructions!

@smiller4
Copy link

smiller4 commented Apr 21, 2017

smiller4:~/workspace $ git remote add origin git@github.com:smiller4/solid-state-theme.git
fatal: Not a git repository (or any of the parent directories): .git
smiller4:~/workspace $ 

??? What am I doing wrong here?

@al26p
Copy link

al26p commented Apr 22, 2017

@smiller4 Got same issue, i had to initiate git before that.
`

That works for me

Copy link

ghost commented May 7, 2017

I have added the public keys but still cant push -u origin master permission denied

@jonesmangamei
Copy link

jonesmangamei:~/workspace/simplecodecast_saas (master) $ git push origin master
fatal: 'github.com/jonesmangamei/simplecodecast_saas' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

@mjones129
Copy link

@dannytech Dude, thanks so much! Just pushed my first ever c9 workspace to github!

@kisslaay
Copy link

kisslaay commented Aug 16, 2017

@jboulhous cheers!

@nicklonz
Copy link

Where is the Cloud9 SSH key after the new AWS integration???

@landonain
Copy link

"git remote add origin " fixed this server permission error for me

@sainiashish9641
Copy link

Awessommm..... i got the solution!

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