Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/457.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Grunt SSH错误:cygwin unix套接字文件格式错误_Javascript_Windows_Ssh_Gruntjs_Git Bash - Fatal编程技术网

Javascript Grunt SSH错误:cygwin unix套接字文件格式错误

Javascript Grunt SSH错误:cygwin unix套接字文件格式错误,javascript,windows,ssh,gruntjs,git-bash,Javascript,Windows,Ssh,Gruntjs,Git Bash,我试图设置一个任务,将ssh连接到远程服务器,并使用ssh执行一些操作。我正在windows机器上使用git bash。my Grunfile.js的相关部分如下: grunt.initConfig({ sshconfig: { portfolioServer: { host: 'myWebsite.com', username: 'root', agent: process.env.SSH_AUTH_SOCK, } }, sshexec:{ d

我试图设置一个任务,将ssh连接到远程服务器,并使用ssh执行一些操作。我正在windows机器上使用git bash。my Grunfile.js的相关部分如下:

grunt.initConfig({
sshconfig: {
    portfolioServer: {
    host: 'myWebsite.com',
    username: 'root',
    agent: process.env.SSH_AUTH_SOCK,
    }
},

sshexec:{
    deploy:{
    command: [
        'cd portfolio',
        'git pull'
    ].join(' && ')
    },
    options:{
    config: 'portfolioServer'
    }
},


........etc.

grunt.loadNpmTasks('grunt-ssh');
我的问题是,当我运行
grunt deploy
任务时,出现以下错误:

Running "sshexec:deploy" (sshexec) task
Warning: Connection :: error :: Error: Malformed cygwin unix socket file Use --force to continue.

Aborted due to warnings.
如果使用
--force
标志运行,则会得到以下输出:

Running "sshexec:deploy" (sshexec) task
Warning: Connection :: error :: Error: Malformed cygwin unix socket file Used --force, continuing.
Warning: Connection :: error :: Error: Authentication failure. Available authentication methods: publickey,password Used --force, continuing.

Done, but with warnings.
这似乎表明我的SSH身份验证设置不正确,或者用于让命令行识别密钥的命令格式不正确。这让我有点困惑,因为我已经按照说明在命令行上设置了SSH密钥,并且能够通过键入
SSH成功地将SSH连接到我的服务器中root@myWebsite.com


出了什么问题?

您找到了解决方案吗?我刚刚尝试在Cygwin 2.0.0下与ssh代理连接,在修复了一个与获取正确套接字路径有关的错误(与您的错误无关)后,我就可以正常连接了。如果您仍然遇到此问题,并且有机会,请将文件内容发布到
process.env.SSH\u AUTH\u SOCK