How to specify registry while doing npm install with git remote url?

前端 未结 2 1777
挽巷
挽巷 2021-02-05 03:43

I want to be able to clone a git repository using a URL as specified here

://[[:]@][:&l         


        
2条回答
  •  天涯浪人
    2021-02-05 04:23

    npm gets its config settings from the command line, environment variables, and npmrc files. You can try to specify registry in a npmrc file, and module in the command line. To change registry, you can use command:

    npm config set registry 
    

    You can also change configs with the help of -- argument. Putting --foo bar on the command line sets the foo configuration parameter to "bar". So you can try something like that:

     npm install http://git.repo.url --registry=https://your.registry.local/
    

提交回复
热议问题