Search code examples
gitgithubgit-push

getting an error when pushing to github using Mac osx?


The steps i took exactly on the terminal

went to the project directory i want to push:

>git remote add origin git@github.com:hackrvinchi/jquery.checkbox.git
>git push origin master

but i get this error, i don't know why

ssh: connect to host github port 22: Operation timed out fatal: The remote end hung up unexpectedly


Solution

  • The git URL is wrong. it should be:

    git@github.com/hackrvinchi/jquery-checkbox.git

    not jquery.checkbox.git

    See here: https://github.com/hackrvinchi/jquery-checkbox

    EDIT 2: (fixed URL)

    So to fix it, do this:

    git remote rm origin
    git remote add origin git@github.com:hackrvinchi/jquery-checkbox.git
    

    Then try pushing again