0

I'm trying to push my files to my GitHub, but I'm getting the following error:

error: cannot run rpostback-askpass: No such file or directory 
fatal: could not read Username for 'https://github.com': Device not configured

Details:

  • I'm using MAC

  • My git version: git version 2.32.1 (Apple Git-133)

  • I'm linking my project to GitHub with HTTP protocole

I ran git config --global user.name and user.mail in the terminal in Rstudio

I tried to use the solution of running git push -u origin main and when I type in my credentials, it gives me the error: "authentication failed". I never changed my password to GitHub, I checked it today to enter the website, it works.

I tried using ssh protocol instead but it seems to be giving me even more errors even though I created my ssh key and added it successfully to my GitHub. Specifically when I click on create new project and add the ssh link Rstudio says:

Cloning into 'data-science-hw'...
ssh_askpass: exec(rpostback-askpass): No such file or directory Host key verification failed. 
fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

I went through all the possible suggestions I could find on the internet but none of them worked. I also tried linking a token generated by git, but it work either.

I would be very happy if anybody has any idea what else I could try..

shafee
  • 15,566
  • 3
  • 19
  • 47
tensai
  • 51
  • 7
  • Does this help you? https://stackoverflow.com/questions/40274484/fatal-could-not-read-username-for-https-github-com-device-not-configured – Matt Dec 27 '22 at 22:41
  • Unfortunately not. They have some ideas for Android Studio but I'm using Rstudio so it's not applicable. Other than that ideas like trying ssh - i tried and it didn't solve the problem( – tensai Dec 28 '22 at 09:26
  • One source of this error could also be that the (interactive) prompt to add the host to the list of known hosts does not work properly. Execute `ssh -T git@github.com` and see whether you can successfully connect over SSH. It might ask you to add *github.com* to the list of known hosts. Confirm this and then try again in Rstudio. – Matt Dec 28 '22 at 14:34
  • 1
    HI Matt, I just tried and it says: You've successfully authenticated, but GitHub does not provide shell access. – tensai Dec 29 '22 at 08:49
  • I've tried to create a new project in R studio now connecting to the repo in Github through SSH key but getting this error : ssh_askpass: exec(rpostback-askpass): No such file or directory git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. – tensai Dec 29 '22 at 08:50
  • I have created an SSH key, created a key in r studio, saved both in my github account and added them both to the ssh-agent, made sure it's running in the back. For now the only issue I'm facing I could think of is .ssh/known_hosts: Permission denied. I tried running chmod 644 ~/.ssh/known_hosts - but still denied. – tensai Dec 29 '22 at 08:54
  • so just to sum up: if I try to use HTTP protocol, I can commit but get an error when pushing the "push button" : error: cannot run rpostback-askpass: No such file or directory fatal: could not read Username for 'https://github.com': Device not configured If I use SSH to create a new project I get an error: ssh_askpass: exec(rpostback-askpass): No such file or directory git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. – tensai Dec 29 '22 at 10:02

0 Answers0