通过Jenkins工具安装go-1.17时,格式不正确的输入或输入包含不可映射的字符



嗨,我正试图为jenkins代理设置go-1.17 env,但我遇到了一个与不可映射字符有关的问题有什么解决办法吗

输出:

Unpacking Go from https://golang.org/dl/go1.17.linux-amd64.tar.gz to /home/ubuntu/Jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/go-1.17 on api2
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from <some_ip>
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1797)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
at hudson.remoting.Channel.call(Channel.java:1001)
at hudson.FilePath.act(FilePath.java:1165)
at hudson.FilePath.act(FilePath.java:1154)
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:1010)
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:946)
at org.jenkinsci.plugins.golang.GolangInstaller.performInstallation(GolangInstaller.java:57)
at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:70)
at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107)
at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:220)
at org.jenkinsci.plugins.golang.GolangInstallation.forNode(GolangInstallation.java:44)
at org.jenkinsci.plugins.golang.GolangInstallation.forNode(GolangInstallation.java:22)
at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:155)
at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:136)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /home/ubuntu/Jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/go-1.17/go/test/fixedbugs/issue27836.dir/Äfoo.go

Jenkinsfile

pipeline {
agent any
tools {
go 'go-1.17'
}
environment {
GO111MODULE = 'on'
}
stages {
stage('Setting up dependencies'){
steps {
echo 'Setting up dependencies'
sh 'go mod vendor'
}
}
stage('Build') {
steps {
echo 'Running build automation'
sh 'go build -o main'
}
}
}
}

代理和主文件编码为UTF-8(通过系统信息进行检查(

在代理配置中单击高级,然后在JWM选项中键入

-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8

然后重新连接您的代理,它可能会正常

相关内容

最新更新