当前位置:网站首页>NPM's nexus private server e401 E500 error handling record
NPM's nexus private server e401 E500 error handling record
2022-07-25 15:12:00 【Deep sea blue mountains】
use nexus Built npm Local repository , Publishing times npm ERR! code E401, The reason is that there is no basic permission , Need to log in , When logging in with your account, you will report E500 error , I checked it on the Internet , Less resources , And basically repeat , Now record the problem , For the convenience of partners with the same problems in the later stage
npm E401
npm publish when , Details of the error are as follows :
npm ERR! code E401
npm ERR! Unable to authenticate, need: BASIC realm="Sonatype Nexus Repository Manager"1.npm publish
newspaper 401 BASIC realm="Sonatype Nexus Repository Manager", This is usually npm publish The employer will have this problem ,npm publish You need to have the permission of the local warehouse , Generally, it can be solved by logging in . Login use npm login Input nexus Users created on 、 Password and email are ok
If you can't send it after logging in , Check npm nexus Of Realms Set up , hold npm Bearer Token Reaim Put in Active in , And save

2.npm install
If it's just npm i Words , First check the package address you use , Use nrm ls List the current packages , It can be used nrm use Switch

Next, check Nexus Repository Manager Upper Anonymous Whether open

npm E500
This question is strange , No similar problems were found on the Internet , Now try to write down , Not necessarily representative

home page , There is no problem with the account ,nexus Access is no problem , Namely npm login Just when 500 了 ,
1. Confirm whether to log in npm whoami, View current login npm The account of ,publish You can confirm whether the user is correct when publishing the package , If you log in normally, you can end
npm whoami2. If login is unsuccessful , newspaper E500, Homepage check nexus Whether the account password on the private server is valid , Whether the input is correct
3. Confirm no mistake , Such a rare private server as I encountered 、 All accounts are normal , Just can't log in , Continue with the following attempts
Check the local project configuration file package.json Middle China "publishConfig" Is the address the correct private server address

4. Check local npm Default configuration item , The key is userconfig , Default address :c:\Users\ user \.npmrc file , Save login information in the configuration file
// List npm Default configuration item for
npm config list -l 
In my configuration, there are only the first two lines , So keep logging in E500 abnormal , Although the account information entered is correct , But still report 500, Later, the following three lines were added , namely always-auth、_auth、email After the message , It can be released normally , And directly npm whoami View login information , Unexpectedly, the account number after successful login is displayed ,
registry=http://10.100.xx.xx:5006/repository/npm-group/
save-prefix=~
always-auth=true
_auth="dXNlcmFkbWluOnVzZXJwYXNzd29yZA=="
[email protected]
Here's an explanation :_auth="dXNlcmFkbWluOnVzZXJwYXNzd29yZA=="// Here is [ Account number : password ] Of Base64 Encoded value , Use your own account password Base64 Replace after coding , My problem here is solved , It's ok npm publish 了 . If you have a similar problem , If it hasn't been solved here , Please continue to try to solve , If it's convenient for you , Please leave me a comment about the solution , thank you .
边栏推荐
- Nacos2.1.0 cluster construction
- Fast-lio: fast and robust laser inertial odometer based on tightly coupled IEKF
- CMake指定OpenCV版本
- Deployment and simple use of PostgreSQL learning
- 如何解决Visual Studio中scanf编译报错的问题
- System. Accessviolationexception: an attempt was made to read or write to protected memory. This usually indicates that other memory is corrupted
- Process control (Part 1)
- Instance Tunnel 使用
- How to realize a correct double check locking
- 延迟加载源码剖析:
猜你喜欢

Nacos2.1.0 cluster construction

spark分区算子partitionBy、coalesce、repartition

Unable to start web server when Nacos starts

pl/sql 创建并执行oralce存储过程,并返回结果集

"How to use" agent mode

System. Accessviolationexception: an attempt was made to read or write to protected memory. This usually indicates that other memory is corrupted

Introduction to raspberry Pie: initial settings of raspberry pie

树莓派入门:树莓派的初始设置

API health status self inspection

如何解决Visual Studio中scanf编译报错的问题
随机推荐
Boosting之GBDT源码分析
Spark002 --- spark task submission, pass JSON as a parameter
Share a department design method that avoids recursion
MySQL sort
Handle Oracle deadlock
System. Accessviolationexception: an attempt was made to read or write to protected memory. This usually indicates that other memory is corrupted
SSM Advanced Integration
Scala110-combineByKey
API health status self inspection
VMware Workstation fails to start VMware authorization service when opening virtual machine
String type time comparison method with error string.compareto
Spark SQL空值Null,NaN判断和处理
Log4j2 basic configuration
【JS高级】js之正则相关函数以及正则对象_02
处理ORACLE死锁
spark中saveAsTextFile如何最终生成一个文件
Introduction to raspberry Pie: initial settings of raspberry pie
用OpenPose进行单个或多个人体姿态估计
[C topic] Li Kou 206. reverse the linked list
outline和box-shadow实现外轮廓圆角高光效果