How to connect my project to github

nodejs
github

#1

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?


#2

Look this : http://lepidllama.net/blog/how-to-push-an-existing-cloud9-project-to-github/


#3

@sbenfarhat
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…


#4

Have you been here? https://c9.io/account/repos


#5

@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…


#6

Open your project : https://ide.c9.io/username/project
now, on the bash terminal, make this :

git init
git add .
git commit -m "first commit"
git remote add origin https://github.com/username/project.git
git push -u origin master

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


#7

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


#8

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


#9

no problem @geekmonster :wink: !


#10

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


#11

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 https://github.com/settings/keys.


#12

Hey there. I have executed the below commands:
git init
git add .
git commit -m "first commit"
git remote add origin https://github.com/username/project.git111
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.


#13

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.


#14

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.


#15

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 user.name <your_github_username_here>
git config --global user.email <your_github_email_here>

You can also use an email address in the format <your_github_username_here>@users.noreply.github.com, 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.


#16

Thanks Danny! This definitely worked.


#17

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


#18

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.