How to connect my project to github



I’ve been looking at tutorials but a lot of them beat around the bush to much. I created my project and I’m about a quarter of the way through but just recently I was asked to push it to git hub and I had to create a whole nother freakin work-space and now I have to recreate this whole thing. How do avoid doing this, I mean how do I simply push what I currently have to this group repo?


Look this :


when I go to my dashboard I don’t see anything that says add-on services, I have a free account, Is that the reason I don’t see add-on in the bottom left? cause I’ve been looking all over this dag-on dashboard and I don’t see jack diddly…


Have you been here?


@sbenfarhat yeah I’ve been there but It doesn’t let me push my old project to an outside…
Wait let me look at this tut again…


Open your project :
now, on the bash terminal, make this :

git init
git add .
git commit -m "first commit"
git remote add origin
git push -u origin master

After this steps, said me if its work or always not?


@sbenfarhat Thanks for the reply I’m trying it out as soon as I get my Jankey ass computer working again…


@sbenfarhat Hey, I forgot to give you your praise bruh, That worked perfect. I really appreciate your help…


no problem @geekmonster :wink: !


It shows fatal: remote origin already exists. That means my repo already exist. But when i go to push
Warning: Permanently added ‘,’ (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.

Now what i do?


Use git remote -v to see url of origin, most likely you have https:// url instead of a one with git.

In that case use c9 open .git/config and change the url in that file, or use git remote set-url origin "newurl".

If you still get permission denied errors after that, add you public ssh key from cloud9 to


Hey there. I have executed the below commands:
git init
git add .
git commit -m "first commit"
git remote add origin
git push -u origin master

It’s asking me to enter my username(i provide it) and password, but when it come to enter password i just can’t type anything.
Could some one help me please.


I assume you mean that when you type, nothing appears. This is normal. In order to protect you from “shoulder surfing,” as in someone looking over your shoulder and seeing your password, bash simply doesn’t display anything. When it asks for your password, just enter your password carefully, and once you are finished, hit enter, and it should continue.


Hi there! New to this cloud9 community. When I hit git init for my project, should there be a .git directory within my root directory called “.git”? It just usually appears in the environment I was using before that’s why i asked. I am able to successfully commit and push my changes but when I check github it shows the commit is from “EC2 Default user”. Why isn’t it showing up as me? Sorry if this is a dumb question.


You’ll have to click on the gear icon and choose “Show Hidden Files” to show the .git directory. As for the commit name, you can use the following commands to set these correctly:

git config --global <your_github_username_here>
git config --global <your_github_email_here>

You can also use an email address in the format <your_github_username_here>, and update your privacy settings on the Email tab of your GitHub settings if you don’t want to have your real email associated with the commit.


Thanks Danny! This definitely worked.


hi there!
After entering my username and password, it shows like below:
remote: Repository not found.
fatal: repository ‘’ not found
what should I do?


I’m not sure if you’ve changed the link in your question, but that repository, as the error suggests, does not exist. You’ll have to create a repository with the correct name on GitHub and then try again.


I couldn’t get the push to work due some inconsistency with the hash between my C9 and Git hub. I’m doing school work, and not much to lose so I just forced it and it worked fine

git push -f origin master

So jic this helps someone else, but also curious if anyone has any thoughts on this.