0

我已经安装了 Jfrog CLI (2.12.0) 并使用jf config add命令对其进行了配置。

在传递平台 URL、用户名和密码后,我执行 jf rt ping检查连接。

但是我收到以下错误作为响应

[root@osc-in-bldslave-1 opt]# jf rt ping
19:13:51 [Error] Server response: 405 Method Not Allowed
{
  "errors": [
    {
      "status": 405,
      "message": "Method Not Allowed"
    }
  ]
}

如果您需要任何其他详细信息,请告诉我。

以下是我在 Jfrog CLI 配置时遵循的步骤。如果配置有任何问题,请纠正我。

[root@osc-in-bldslave-1 ~]# jf -version
jf version 2.12.0
[root@osc-in-bldslave-1 ~]#
[root@osc-in-bldslave-1 ~]# jf config add
Choose a server ID : <server id>
JFrog platform URL [http://xxx.xx.xxx.xx:8081/]: http://xxx.xx.xxx.xx:8081/
JFrog access token (Leave blank for username and password/API key):
JFrog username [username]: <username>
JFrog password or API key:<passing password here>
Is the Artifactory reverse proxy configured to accept a client certificate? (y/n) [n]? n
[root@osc-in-bldslave-1 ~]#
[root@osc-in-bldslave-1 ~]# jf rt ping
09:55:13 [Error] Server response: 405 Method Not Allowed
{
  "errors": [
    {
      "status": 405,
      "message": "Method Not Allowed"
    }
  ]
}
[root@osc-in-bldslave-1 ~]#

但是,如果它尝试使用下面的命令直接 ping 我的 URL,它工作正常。

[root@osc-in-bldslave-1 ~]# jf rt ping --url=http://172.xx.xxx.xx:8081/artifactory/
OK

我新删除并安装了 Jfrog CLI,仍然面临相同的 405:方法不允许问题。

任何人都可以让我知道缺少什么吗?

4

2 回答 2

0

看起来在配置 JFrog CLI 时某些参数不正确,因此引发了错误。同样在我的环境中进行了测试,并按预期工作。

➜ jf -version jf 版本 2.12.0
➜ jf rt ping OK

于 2022-02-08T15:05:47.383 回答
0

您可以使用命令“which jf”和“whereis jf”找到

于 2022-02-09T05:27:10.777 回答