httphotoshop访问nexus 以和Maven和VUE私服的创建
注意:
1,不要使用docker版的nexus,要不然哭的很惨
2,SSL的key怎么弄这里就不做说明了
3,nginx,nexus安装网上太多了哈就不说了
整活儿
- 配置nginx
截取部分配置信息
-
-
server {
-
listen 443 ssl;
-
server_name localhost;
-
root /usr/share/nginx/html;
-
underscores_in_headers on;
-
-
ssl_certificate "/etc/nginx/key/XXXXX.pem";
-
ssl_certificate_key "/etc/nginx/key/XXXXX.key";
-
ssl_session_cache shared:SSL:1m;
-
ssl_session_timeout 5m;
-
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
-
ssl_ciphers ECDH:AESGCM:HIGH:!RC4:!DH:!MD5:!3DES:!aNULL:!eNULL;
-
ssl_prefer_server_ciphers on;
-
location / {
-
proxy_pass http://localhost:8085;
-
proxy_set_header REMOTE_ADDR $remote_addr;
-
proxy_set_header Host $http_host;
-
proxy_set_header X-Forwarded-Proto https;
-
proxy_http_version 1.1;
-
proxy_set_header Connection "";
-
proxy_set_header Upgrade $http_upgrade;
-
proxy_set_header Connection "upgrade";
-
}
-
}
没有什么特殊的 underscores_in_headers 表示头信息可以用下划线
重启 ./nginx -s reload
- 配置nexus
- 再nexus中添加证书(读取PEM,复制进去)
配置匿名访问
- 配置库,maven和vue大体一样,就是在创建host,group,proxy的时候别选错了,这里就拿vue举例
先创建blob
创建host
创建proxy(可能有多个)
可以根据自己的服务器网速用nrm 或者yrm测试一下
这里是常用的代理地址
npm ---------- https://registry.npmjs.org/
yarn --------- https://registry.yarnpkg.com/
tencent ------ tencent npm mirrors
cnpm --------- https://r.cnpmjs.org/
taobao ------- https://registry.npmmirror.com/
npmMirror ---- https://skimdb.npmjs.com/registry/
创建group,把刚刚创建的htos和proxy都放进去
重启nexus
- 在客户端使用的时候需要登陆
npm login --registry='https://ip:8081/repository/npm-public/'
更换源
npm config set registry 'https://ip:8081/repository/npm-public/'
npm install
- Maven的配置
在打包的过程中可能会遇到的错
(1) sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
(2) Could not transfer artifact org.jyaml:jyaml:pom:1.3 from/to nexus (https://ip/repository/info-public/): Transfer failed for phttps://ip/repository/info-public/org/jyaml/jyaml/1.3/jyaml-1.3.pom
都是一个解决方法(注意配置好环境变量)
mvn clean install -Dmaven.test.skip=true -Dmaven.multiModuleProjectDirectory=$MAVEN_HOME -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true
(3) npm ERR! code E401
npm ERR! Unable to authenticate, need: BASIC realm="Sonatype Nexus Repository Manager"
解决 客户端需要登陆
(4) npm ERR! Failed at the nodent-runtime@3.2.1 install script.
npm ERR! Failed at the node-sass@4.14.1 postinstall script.
这个需要先设置
npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass
(5) Setting the TLS ServerName to an IP address is not permitted by RFC 6066. This will be ignored in a future version.
https访问时不能直接用ip需要映射一个域名
在设置一下ssl忽略验证 yarn & npm config set strict-ssl false
(6) 每个用户有自己的yarn配置,查看 yarn config list
删除配置 npm config delete <#name#>
这篇好文章是转载于:学新通技术网
- 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
- 本站站名: 学新通技术网
- 本文地址: /boutique/detail/tanhgegjgf
-
photoshop保存的图片太大微信发不了怎么办
PHP中文网 06-15 -
Android 11 保存文件到外部存储,并分享文件
Luke 10-12 -
word里面弄一个表格后上面的标题会跑到下面怎么办
PHP中文网 06-20 -
《学习通》视频自动暂停处理方法
HelloWorld317 07-05 -
photoshop扩展功能面板显示灰色怎么办
PHP中文网 06-14 -
微信公众号没有声音提示怎么办
PHP中文网 03-31 -
excel下划线不显示怎么办
PHP中文网 06-23 -
excel打印预览压线压字怎么办
PHP中文网 06-22 -
怎样阻止微信小程序自动打开
PHP中文网 06-13 -
TikTok加速器哪个好免费的TK加速器推荐
TK小达人 10-01