Having trouble pushing a commit to Git on OSX -


i'm new git user , i'm having trouble getting first commit working. i'm using terminal in osx. i've done far:

1) i've set github account , added repository 2) i've created ssh key , added account 3) i've tested connection domain , github says i've authenticated. 4) i've set repository on local system using:

echo "# test" >> readme.md git init git add readme.md git commit -m "first commit" git remote add origin https://github.com/fakename/test.git git push -u origin master 

and error:

ssh: not resolve hostname https: nodename nor servname provided, or not known fatal: not read remote repository.

please make sure have correct access rights , repository exists.

in ~/ssh director have files id_rsa, id_rsa.pub , known_hosts. have no ssh config file.

what missing? thank you.

if want use authentication ssh, need use following scheme:

git@github.com:<username>/<repository>.git 

if added remote, can change url this:

git remote set-url origin git@github.com:fakename/test.git 

or same result 2 commands:

git remote remove origin git remote add origin git@github.com:fakename/test.git 

Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -