GitHub SSH doesn't work

I know this is not a general help forum, but just to share my piece when dealing with this issue: I had to switch from https to ssh url. This resolved the issue.

_Originally posted by @ratnanil in Very common RStudio/git problem+solution: "error: unable to read askpass response from 'rpostback-askpass'" 路 Issue #93 路 STAT545-UBC/Discussion 路 GitHub

:+1:t2:

You can only push to two types of URL addresses:

  • An HTTPS URL like https://github.com/user/repo.git
  • An SSH URL, like git@github.com:user/repo.git

Git associates a remote URL with a name, and your default remote is usually called origin .

source: About remote repositories - GitHub Docs

Referred to above link and works (Noted, HTTPS URL required tokens but SSH URL properties won't).

+$ git remote set-url origin git@github.com:englianhu/CG.IwithR.git
+(base) :~/Documents/GitHub/CG.IwithR$ git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 4 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 322 bytes | 322.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To github.com:englianhu/CG.IwithR.git
   cb54c01..3b5844a  master -> master