小编Son*_*tty的帖子

Jenkins Git集成 - 如何禁用SSL证书验证

我在从Jenkins创建工作时遇到以下错误.如何在Jenkins中禁用证书验证?

从Git Bash我可以使用git config --global http.sslVerify false命令来禁用它,但不知道如何从Jenkins使用它.

错误:

Failed to connect to repository : Command "C:\Program Files (x86)\Git\cmd\git.exe ls-remote -h url ofmy repository.git HEAD" returned status code 128:
stdout:
stderr: fatal: unable to access 'url of my git/': SSL certificate problem: self signed certificate in certificate chain
Run Code Online (Sandbox Code Playgroud)

git jenkins jenkins-plugins

10
推荐指数
3
解决办法
4万
查看次数

无法创建新的远程会话 - Selenium webdriver

我越来越异常了

线程"main"中的异常org.openqa.selenium.SessionNotCreatedException:无法创建新的远程会话.在尝试在远程Web驱动程序中运行selenium脚本时,所需的功能=功能[{marionette = true,browserName = firefox,version = 48.0.1,platform = ANY}],required capabilities = Capabilities [{}]'.

集线器和节点配置正确,并且能够相互通信.

Selenium Web驱动程序:3.0平台:Windows Server 2012 R2.Firefox版本:48.0.1

我脚本中使用的代码:

       System.setProperty("webdriver.gecko.driver", "mypath/geckodriver.exe");
     DesiredCapabilities capabilities = DesiredCapabilities.firefox(); 
     capabilities.setCapability("marionette", true);
     capabilities.setBrowserName("firefox");
     capabilities.setPlatform(Platform.ANY);

     RemoteWebDriver driver =new RemoteWebDriver(new URL("http://ipofthenode:4444/wd/hub"), capabilities);

     driver.get("http://stackoverflow.com");

     System.out.println("executed");
Run Code Online (Sandbox Code Playgroud)

详细的堆栈跟踪:

2017年6月19日下午6:07:36 org.openqa.selenium.remote.ProtocolHandshake createSession INFO:尝试双方言会议,假设Postel法则适用于远程端2017年1月19日下午6:07:37 org.openqa .selenium.remote.ProtocolHandshake createSession INFO:回归原始的OSS JSON Wire Protocol.2017年1月19日下午6:07:37 org.openqa.selenium.remote.ProtocolHandshake createSession INFO:回归直接W3C远程结束连接线程"main"中的异常org.openqa.selenium.SessionNotCreatedException:无法创建新的远程会话.desired capabilities = Capabilities [{marionette = true,browserName = firefox,version = 48.0.1,platform = ANY}],required capabilities = Capabilities [{}] Build info:version:'3.0.0',revision:'350cf60' ,时间:'2016-10-13 10:48:16 -0700'

java selenium selenium-grid selenium-webdriver

8
推荐指数
1
解决办法
8624
查看次数

Nodejs - 无法读取文件目录中有空间的文本文件

我正在尝试读取放置在 Visuals Studio 2017 项目文件夹中的文件。由于文件路径中有空格,下面的代码总是返回'Error - File does not Exists'。我尝试在路径周围加上双引号,并将所有空格替换为 %20。不幸的是,这两种方法都不适合我

有人可以帮我解决吗?

文件路径 -

C:/Users/Guest/Documents/Visual Studio 2017/Projects/help.txt
Run Code Online (Sandbox Code Playgroud)

代码:

if (fs.existsSync(filePath)) {

        fs.readFile(filePath, 'utf8', function (err, contents) {
            if (err) {
                logger.error("Error while reading the file - " + filePath)
                next("Error while reading the file")
            } else {
                next(contents);
            }
        });
    } else {
        logger.error("File does not exist in path - " + filePath)
        next("Error - File does not Exists")
    }
Run Code Online (Sandbox Code Playgroud)

javascript node.js

5
推荐指数
1
解决办法
5269
查看次数

Nodejs同步for循环

有人可以帮助我以同步方式运行以下循环吗?由于下面的代码是异步执行的,值arra总是返回 null。

var arra=[];
//Query doctors collection and get necessary details           
for (i = 0; i <arr.length; i++) {
    var docregistrationnumber = arr[i].docregistrationnumber
    var registrationAuthority = arr[i].docregistrationauthority                
    doctorData.getDoctorByRegNumber(docregistrationnumber,registrationAuthority,function(data){
        console.log(JSON.stringify(data))  
        arra.push(data)                
    })
} 
console.log(arra) 
Run Code Online (Sandbox Code Playgroud)

javascript node.js promise

1
推荐指数
1
解决办法
7451
查看次数