在公司代理后面运行时,纱线安装失败,出现“403 Forbidden”错误

Sai*_*ula 5 proxy maven yarnpkg

当通过企业代理后面的 maven-front-end 插件运行 yarn install 时,安装在目标“yarn”失败,并出现以下错误:

[ERROR] error 发生意外错误:“ https://registry.yarnpkg.com/@angular/forms/-/forms-4.4.3.tgz : Request failed \"403 Forbidden\"”。

pom.xml 的相应部分

    <plugin>
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>
        <version>1.6</version>
        <executions>
          <execution>
            <id>install node and yarn</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>install-node-and-yarn</goal>
            </goals>
            <configuration>
              <nodeVersion>${node.version}</nodeVersion>
              <yarnVersion>${yarn.version}</yarnVersion>
            </configuration>
          </execution>
          <execution>
            <id>yarn set proxy config</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>yarn</goal>
            </goals>
            <configuration>
              <arguments>config set strict-ssl false -g</arguments>
            </configuration>
          </execution>              
          <execution>
            <id>yarn install</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>yarn</goal> --- Fails here
            </goals>
          </execution>
        </executions>
     </plugin>
Run Code Online (Sandbox Code Playgroud)

谁能指出可能是什么问题?这是日志:

[信息] --- maven-clean-plugin:2.5:clean (default-clean) @ plmapp-web2

[信息] --- frontend-maven-plugin:1.6:install-node-and-yarn(安装节点和纱线)@ plmapp-web2 ---

[INFO] 找到代理:[optional{protocol='http', host='proxy', port=8080}, optional_https{protocol='https', host='proxy', port=8080}]

[INFO] Node v6.11.3 已经安装。[信息] Yarn 1.1.0 已经安装。

[INFO] 找到代理:[optional{protocol='http', host='proxy', port=8080}, optional_https{protocol='https', host='proxy', port=8080}]

[信息]在 /tmp/plm/build-dir/PWA 中运行“yarn config set strict-ssl false -g --https-proxy= http://proxy:8080 --proxy= http://proxy:8080 ” -PWA-JOB1/plmapp-web2

[信息] 纱线配置 v1.1.0

[信息] 成功将“strict-ssl”设置为“false”。[信息] 在 0.09 秒内完成。

[INFO] [INFO] --- frontend-maven-plugin:1.6:yarn (yarn install) @ plmapp-web2 ---

[INFO] 找到代理:[optional{protocol='http', host='proxy', port=8080}, optional_https{protocol='https', host='proxy', port=8080}]

[信息]在 /tmp/plm/build-dir/PWA-PWA-JOB1/plmapp-web2 中运行“纱线 --https-proxy= http://proxy:8080 --proxy= http://proxy:8080

[信息] 纱线安装 v1.1.0

[INFO] [1/4] 正在解析包...

[INFO] [2/4] 正在获取包...

[INFO] info 如果您认为这是一个错误,请使用“/tmp/plm/build-dir/PWA-PWA-JOB1/plmapp-web2/yarn-error.log”中提供的信息打开错误报告。

[INFO] info 访问https://yarnpkg.com/en/docs/cli/install获取有关此命令的文档。

[ERROR] error 发生意外错误:“ https://registry.yarnpkg.com/@angular/forms/-/forms-4.4.3.tgz : Request failed \"403 Forbidden\"”。