rstudio push' rpostback-askpass'错误

时间:2015-09-21 16:11:31

标签: git rstudio ssh-keys

从CLI,我可以推/拉到git。然而,从Rsudio,我只能拉,但不能推。我为ssh / https端口打开了防火墙 但是在尝试推送时我仍然遇到以下错误:

error: unable to read askpass response from 'rpostback-askpass'
fatal: could not read Username for 'https://github.com': No such device or address

Rstudio版本0.99.484。

5 个答案:

答案 0 :(得分:4)

问题在于RStudio中最新的https身份验证。 (如this post中所述)

解决方案是通过编辑项目中的存储库配置将存储库URL从https切换到ssh:.git / config

然后,不要忘记在github上设置公钥(您的个人资料 - >设置 - > SSH密钥,如解释here

答案 1 :(得分:0)

解决方案是将密码添加到位于.ssh目录中的“id_rsa”。这就是我的情况。我使用的是Linux服务器。

~/.ssh$ ls
**id_rsa  id_rsa.pub  known_hosts

以下是步骤:

第1步:尝试从CLI ssh时看到的内容

 $ ssh -vT git@github.com
    # ...
    # Agent admitted failure to sign using the key.
    # debug1: No more authentication methods to try.
    # Permission denied (publickey).

第2步: 在后台启动ssh-agent

eval "$(ssh-agent -s)"
# Agent pid 59566
ssh-add
# Enter passphrase for /home/you/.ssh/id_rsa: ***TYPE YOUR PASSPHRASE HERE***
# Identity added: /home/you/.ssh/id_rsa (/home/you/.ssh/id_rsa)

第3步: $ init 6< -----重启你的linux服务器

现在,我可以从Rstudio推/拉!

信用转到此链接:https://help.github.com/articles/error-agent-admitted-failure-to-sign/

答案 2 :(得分:0)

当Git没有将我的密码存储在缓存中时,我总是会收到此错误。

要设置git以便存储密码,只需在您的git设置中输入credential.helper=cache --timeout=3600,如下所示:

git config --global --set credential.helper 'cache --timeout=3600'

(请注意,此行适用于Linux,与其他操作系统略有不同。)

使用默认shell中的git config -l检查您的Git设置,他们应该这样(+下面的其他行):

user.email=<your.mail>
user.name=<your.username>
credential.helper=cache --timeout=3600

现在你必须在第一次从你的Github回购中拉/推东西时使用shell。只需点击RStudio中的Tools -> Shell即可。 shell窗口将在RProject的目录中打开。输入git push,git会询问您的用户名和密码。

背后的原因是Git会在shell中询问您的密码,并将其存储在缓存中--timeout=xxxx中设置的时间。

现在您可以使用RStudio中的push / pull按钮。

答案 3 :(得分:0)

我在新的github存储库中遇到了这个问题,设置公共SSH密钥(由Viliam Simko链接)并没有解决它。按照建议here从命令行推送,一劳永逸地完成了这个技巧。

答案 4 :(得分:0)

从git 1.9.1开始,您的$HOME/.gitconfig文件应如下所示:

[credential]
        helper = cache --timeout=3600