Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rstudio: error when pushing to github #104

Closed
bbest opened this issue May 23, 2014 · 5 comments
Closed

rstudio: error when pushing to github #104

bbest opened this issue May 23, 2014 · 5 comments
Assignees
Milestone

Comments

@bbest
Copy link
Collaborator

bbest commented May 23, 2014

When pushing commits within RStudio to github, getting this error:

error: unable to read askpass response from 'rpostback-askpass'
fatal: could not read Username for 'https://github.com': Device not configured

image

@bbest bbest added this to the later milestone May 23, 2014
@bbest bbest self-assigned this May 23, 2014
@bbest
Copy link
Collaborator Author

bbest commented May 23, 2014

Hi @Melsteroni, @jules32, @katlongo, @jafflerbach,

If you're using the latest version of RStudio (eg version 0.98.501) on Mac or Linux, you're probably getting this error when pushing commits within RStudio to github:

error: unable to read askpass response from 'rpostback-askpass'
fatal: could not read Username for 'https://github.com': Device not configured

In the GUI, this looks like this:

image

There's a problem with the latest https authentication using RStudio. This is not actually a problem with git or storing your username password, since the following works from Terminal:

cd ~/[github_dir]/[repo]
git push

So the solution to get RStudio to play nicely again is to switch the repository URL from https to ssh by editing the repository's config. Since it's in a hidden folder (prefixed with .) and you may want to edit from terminal after ssh user@neptune.nceas.ucsb.edu, I recommend editing the file like so:

pico ~/[github_dir]/[repo]/.git/config

Then you'll want to comment out the https and use the alternative ssh address that begins with git to look like:

[remote "origin"]
        #url = https://github.com/bbest/ohiprep.git
        url = git@github.com:bbest/ohiprep.git

Note that in the above example you'll want to switch to out: bbest=[user] and ohicore=[repo].

Apologies for the hassle, but it's actually quick to fix. Then you're back to being smooth operators (cue Sade 🎶).

PS I've logged this in the ohiprep/wiki/Using GitHub page, where I've also updated help on Resolving Conflicts .

@bbest bbest closed this as completed May 23, 2014
@bbest
Copy link
Collaborator Author

bbest commented May 23, 2014

PS Another quick way to get the ssh URL that starts with git is to visit your repository online, click for the SSH clone URL like so:

bbest_ohiprep

@bbest bbest modified the milestones: 2014-05-12, beyond... May 27, 2014
@drperpo
Copy link

drperpo commented Jun 12, 2015

Have same problem with ssh. My repo is also private so does not connect when I change to ssh.
Any suggestions?

@jules32
Copy link
Contributor

jules32 commented Aug 13, 2015

Hi there,

We've been able to solve the problem when we have encountered it and have written up the following instructions (we wrote this for our Ocean Health Index project, but the solution is obviously relevant far beyond our project). Instructions are in our Ocean Health Index Manual, in the rpostback-askpass error section.

error: unable to read askpass response from 'rpostback-askpass' 
fatal: could not read Username for 'https://github.com': Device not configured 

@xrobin
Copy link

xrobin commented Nov 10, 2015

git config --global credential.helper osxkeychain fixed the problem here. Ssh was not available with the remote I was pushing to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants