ruby on rails - Cannot push to github, ssh: Could not resolve hostname -


i can't pass this, have remade repository multiple times, made ssh keys over

-------------- demo_app <username>$ git remote add origin git@github.com:<username>/demo_app.git  fatal: remote origin exists.  $ git push -u origin master --- ssh: not resolve hostname git: nodename nor servname provided, or not known --- fatal: not read remote repository. --- please make sure have correct access rights --- , repository exists. ---------- ---------  checked ssh keys  ---  $ ssh -t git@github.com  hi <username>! you've authenticated, github not provide shell access.  --- 

still receiving same message.

instead of adding new remote, try change existing 1 following command:

git remote set-url origin git@github.com:<username>/demo_app.git 

edit: so, here commands make work without losing code.

  1. rm -rf .git
  2. git init .
  3. git remote add origin git@github.com:<username>/demo_app.git
  4. git commit --allow-empty -m 'first commit'
  5. git push origin master

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -