Fatal: Not a git repository


#1

I created an empty github repo and I’m trying to push my c9 workspace to it but I get this error:

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 $ 

Can anyone please explain what I’m missing/what I didn’t do properly? I’ve tried googling it.


#2

Sounds like you need to run git init to make the directory into a git repository. Also, see this Stack Overflow thread.


#3

Wow that was such an easy fix! Haha thank you so much man.


#4

Now I get this…

 smiller4:~/workspace (master) $ git commit -m "pls work"
On branch master
nothing to commit, working tree clean
smiller4:~/workspace (master) $ git push origin master
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.