我在nexus 3中创建了代理repos,指向nexus 2托管的repos.这是在nexus2上快照和发布repos.现在,在distributionManagement标签上,iam使用代理URL并尝试执行"mvn clean deploy".我收到了错误
[INFO]部署工件时出错:无法传输文件:http://nexus3url/repository/m2-snapshots/path/abc-1.1.4-SNAPSHOT.pom.返回码是:405
有没有人试过这个.
谢谢
在有关其REST API和脚本的Nexus 3参考中,描述了如何将Groovy脚本上传到Nexus 3以及如何运行它们。示例显示了如何创建新的存储库,例如Maven存储库:
repository.createMavenHosted('private')
Run Code Online (Sandbox Code Playgroud)
但是,听起来很简单,但我没有找到任何类似的方法来删除或删除现有存储库。真的不可能吗?
目前,我一直在设置Nexus 3.2,尤其是NPM存储库。我有一个代理存储库,指向registry.npmjs.org
我已成功发布到同一实例上的托管存储库,以及使用实例通过组存储库下载工件npm update -g
。
不幸的是,通过该小组下载范围内的项目无法正常工作,这对于进行Angular 2开发至关重要。当我尝试时,出现404错误:
brian$ npm install "@angular/common"
npm ERR! registry error parsing json
npm ERR! Unexpected token < in JSON at position 0
npm ERR! <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
npm ERR! <html><head>
npm ERR! <title>404 Not Found</title>
npm ERR! </head><body>
npm ERR! <h1>Not Found</h1>
npm ERR! <p>The requested URL /nexus/repository/npm_group/@angular/common was not found on this server.</p>
npm ERR! </body></html>
npm ERR!
npm ERR! A complete log of this run can be …
Run Code Online (Sandbox Code Playgroud) 我想在 Google 容器引擎中运行 nexus3。
我创建了一个永久磁盘并配置了以下部署文件:
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: nexus3
labels:
app: nexus3
spec:
replicas: 1
selector:
matchLabels:
app: nexus3
template:
metadata:
labels:
app: nexus3
tier: web
spec:
containers:
- image: gcr.io/nexustest-182520/nexus3:3.6.0
name: nexus3
volumeMounts:
- mountPath: /nexus-data
name: nexus3-persistent-storage
ports:
- containerPort: 8081
volumes:
- name: nexus3-persistent-storage
gcePersistentDisk:
pdName: nexus3-disk
fsType: ext4
Run Code Online (Sandbox Code Playgroud)
部署失败并出现以下问题:
kubectl get pods -o=wide
NAME READY STATUS RESTARTS AGE IP NODE
nexus3-1260341461-mj7rf 0/1 Error 2 36s x.x.x.x gke-nexus-cluster-default-pool-9a58e4f2-p1t9
kubectl describe po/nexus3-1260341461-mj7rf
[...]
Events:
FirstSeen …
Run Code Online (Sandbox Code Playgroud) 这让我发疯。我已经安装了Nexus 3 OSS,用作私有的NuGet存储库,并创建了一个用户仇敌。我以文档显示的方式为jenkins用户获得了一个ApiKey,现在我尝试使用
nuget push .\AMAP.*.symbols.nupkg -Source http://nexus.local:8081/repository/nuget-hosted/ -ApiKey <JenkinsApiKeyHere>
Run Code Online (Sandbox Code Playgroud)
但是,如果执行此操作,则会要求我输入用户名和密码。我尝试根据网络上的某些来源的建议将用户名和密码设置为我的配置,如下所示:
nuget sources update -Name my-nuget -username jenkins -password <supersecretjenkinspwd>
Run Code Online (Sandbox Code Playgroud)
但是仍然要求我输入用户名和密码!顺便说一句,已授予对nexus的匿名访问,如sonatype docs中所示。
从上面可以看到,我正在尝试通过jenkins构建服务器执行此操作,并且我已经尝试了nexus工件上传器插件,但未成功。NullPointer失败:
java.lang.NullPointerException
at sp.sd.nexusartifactuploader.steps.NexusArtifactUploaderStep.getUsername(NexusArtifactUploaderStep.java:132)
Run Code Online (Sandbox Code Playgroud)
所以我认为它也有同样的问题。如何在没有用户交互的情况下将我的NuGet软件包推送到Nexus?
启动Sonatype Nexus 3映像(命令1)后,我尝试创建一个存储库并将一个测试映像(命令2)推送到该存储库,但出现错误405(错误1)
命令1
$ docker run -d -p 8081:8081 --name nexus sonatype/nexus3:3.14.0
Run Code Online (Sandbox Code Playgroud)
命令2
$ docker push 127.0.0.1:8081/repository/test2/image-test:0.1
Run Code Online (Sandbox Code Playgroud)
错误1
error parsing HTTP 405 response body: invalid character '<' looking for beginning of value: "\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <title>405 - Nexus Repository Manager</title>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\n\n\n <!--[if lt IE 9]>\n <script>(new Image).src=\"http://127.0.0.1:8081/favicon.ico?3.14.0-04\"</script>\n <![endif]-->\n <link rel=\"icon\" type=\"image/png\" href=\"http://127.0.0.1:8081/favicon-32x32.png?3.14.0-04\" sizes=\"32x32\">\n <link rel=\"mask-icon\" href=\"http://127.0.0.1:8081/safari-pinned-tab.svg?3.14.0-04\" color=\"#5bbad5\">\n <link rel=\"icon\" type=\"image/png\" href=\"http://127.0.0.1:8081/favicon-16x16.png?3.14.0-04\" sizes=\"16x16\">\n <link rel=\"shortcut icon\" href=\"http://127.0.0.1:8081/favicon.ico?3.14.0-04\">\n <meta name=\"msapplication-TileImage\" content=\"http://127.0.0.1:8081/mstile-144x144.png?3.14.0-04\">\n <meta name=\"msapplication-TileColor\" content=\"#00a300\">\n\n <link rel=\"stylesheet\" type=\"text/css\" href=\"http://127.0.0.1:8081/static/css/nexus-content.css?3.14.0-04\"/>\n</head>\n<body>\n<div …
Run Code Online (Sandbox Code Playgroud) 我需要帮助在 ubuntu18.04 上安装 nexus-oss。我无法在互联网上找到任何 apt-get 命令。
我试图在“sudo apt-get search nexus”中搜索 nexus 包,但无法获得合适的 nexus 版本包。
我浏览了网络,那里的命令可用于 centos7 但不适用于 Debian os。
在 sonatype 文档中,提供了在 ubuntu 上创建存储库管理器的步骤,是否与在 ubuntu 上安装 nexus 相同?
字面上地。看来已经有很多人有类似的问题了。 也许一个问题类似于我的问题。 但是我还没有找到解决方案,所以我写得很详细。
我按照教程中的描述在Centos7服务器上安装了 nexus 。教程错误地记录了服务文件中的和命令。反正我修好了。但是,运行 Nexus 将立即终止。execStart
execStop
上一个问题有一些答案。
然而,立即终止没有解决。
我认为唯一的提示如下。 官方文档包含有关 pid 文件的信息。
如果无法写入服务 pid 文件,则服务启动将静默失败,不会将任何日志语句写入 nexus.log。
我找不到nexus.log
文件。这意味着无法根据上述信息创建pid文件。但它只是jvm.log
存在而已。连接到nexus帐户(创建用于运行 Nexus)并在文件/tmp
夹中手动创建文件后,可以在没有任何权限问题的情况下进行创建和删除。但是,如果我在该帐户中手动打开 Nexus,它也会立即关闭。
你怎么能修好呢?我在等待帮助。