2

I'm using the frontend-maven-plugin plugin to pull the dependencies for the frontend of a multi-module maven project, as follows

<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.3</version>
<executions>
    <execution>
      <id>install node and npm</id>
      <goals>
        <goal>install-node-and-npm</goal>
      </goals>
      <phase>generate-resources</phase>
      <configuration>
            <nodeVersion>v12.13.1</nodeVersion>
      </configuration>
    </execution>

    <execution>
        <id>npm install</id>
        <goals>
            <goal>npm</goal>
        </goals>
        <phase>generate-resources</phase>

        <configuration>
            <arguments>install</arguments>
        </configuration>
    </execution>
</executions>
</plugin>

However, the proxy I have to use to connect to github.com recently closed port 22, resulting in the following error in our build environment

[ERROR] npm ERR! Error while executing:
[ERROR] npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/gulpjs/gulp.git
[ERROR] npm ERR! 
[ERROR] npm ERR! ssh: connect to host github.com port 22: Connection timed out
[ERROR] npm ERR! fatal: Could not read from remote repository.
[ERROR] npm ERR! 
[ERROR] npm ERR! Please make sure you have the correct access rights
[ERROR] npm ERR! and the repository exists.
[ERROR] npm ERR! 
[ERROR] npm ERR! exited with error code: 128

According to the sysadmin, I should be able to use https instead of ssh to connect to github, is it possible to configure the plugin to instruct npm to use https, or is there a setting in .npmconfig to do the same?

Joseph McCarthy
  • 897
  • 2
  • 19
  • 41

0 Answers0