情况:在 azure 管道的构建过程中,我在自托管代理上使用 JavaToolInstaller,并将“java/JAVA_HOME_8_x64_”放在目录中
背景:当我对该目录应用完全权限时,我不认为这是权限问题并为构建过程创建它
评估:以前有人见过这个问题吗?
重现步骤 - 托管现场代理
JavaToolInstaller
- task: JavaToolInstaller@0
inputs:
versionSpec: '8'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'LocalDirectory'
jdkFile: '/opt/jdk-8u251-linux-x64.tar.gz'
jdkDestinationDirectory: '/opt/java'
cleanDestinationDirectory: true
condition: eq( variables['Agent.OS'], 'Linux' )
构建过程中出错
Cleaning destination folder before extraction: /opt/java
Retrieving the JDK from local path.
##[warning]Can\'t find loc string for key: ExtractingArchiveToPath
ExtractingArchiveToPath /opt/java/JAVA_HOME_8_x64_jdk-8u251-linux-x64_tar.gz
Creating destination folder: /opt/java/JAVA_HOME_8_x64_jdk-8u251-linux-x64_tar.gz
##[error]Unable to create directory '/opt/java/JAVA_HOME_8_x64_jdk-8u251-linux-x64_tar.gz'. EACCES: permission denied, mkdir '/opt/java/JAVA_HOME_8_x64_jdk-8u251-linux-x64_tar.gz'
##[error]Unable to create directory '/opt/java/JAVA_HOME_8_x64_jdk-8u251-linux-x64_tar.gz'. EACCES: permission denied, mkdir '/opt/java/JAVA_HOME_8_x64_jdk-8u251-linux-x64_tar.gz'
Finishing: JavaToolInstaller