Problems connecting existing c9 workspace to existing git repo

github

#1

Trying to initiate git between an existing c9 workspace and an existing git repo. I have another workspace that talks OK to a different repo under the same username.

Tried the following in bash shell:

git init
git add some file names
git commit -m file name "initial commit"
git remote add origin https://github.com/username/reponame.git
git push -u origin master

when I push I get a request to login
Username for ‘https://github.com’: myname
Password for ‘https://@github.com’: mypw
fatal: authentication failed for ‘https://github.com/username/reponame.git/

so even though I enter the correct credentials and even though I am already connected to the same username from a different c9 workspace and a different git repo that works correctly, I cannot connect to this one.

I don’t want to have to recreate the workspace.

any suggestions?


#2

Have you tried pushing without the -u option?


#3

yes, still does the same thing - wont authenticate


#4

problem solved by using this syntax instead -

git remote add git@github.com:emmotto/projectname.git

:relaxed: