Search code examples
gitgithubgist

Push to gist returning strange error


I cloned a gist using the Public Clone URL. I made my changes, added, and committed. However when I run, git push origin master I get the following error:

fatal: remote error: 
 You can't push to git://github.com/1234567.git
 Use git@github.com:1234567.git

yet according to git remote -v the origin should be at the gist.github.com subdomain

origin  git://gist.github.com/1234567.git (fetch)
origin  git://gist.github.com/1234567.git (push)

Any ideas on resolving this error? Thanks!


Solution

  • Have you tried changing to the remote URL that the error suggests? Try doing:

    git remote set-url --push origin git@github.com:1234567.git
    

    Currently, you're connecting with HTTP and it wants you to connect with SSH.