AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 1165771
Accepted
Ajax
Ajax
Asked: 2024-09-26 21:48:17 +0800 CST2024-09-26 21:48:17 +0800 CST 2024-09-26 21:48:17 +0800 CST

Artifactory conan 存储库返回 404,而不是 401/403

  • 772

我在托管 conan 存储库的服务器上安装了 Artifactory 7.84.14 CPP CE 实例。当用户令牌过期(或用户未通过身份验证)时,Artifactory 返回错误代码 404,而不是 401/403。结果是,conan 返回“未找到包”而不是“请授权”。

> conan install --remote someremote --requires=somepackage/version@some/repo
> ERROR: Package 'somepackage/version@some/repo' not resolved: Unable to find 'somepackage/version@some/repo' in remotes.

在artifactory-request.log文件中有一行404代码。

anonymous|GET|/api/conan/package/path|404|-1|0|5|Conan/2.7.1 (Windows 11; Python 3.12.3; AMD64)

现在。我找到了有关hideUnauthorizedResources配置选项的详细信息(这里和这里)。问题是,这个配置已经存在了。这是配置描述符 xml(来自 AF GUI):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<config xmlns="http://artifactory.jfrog.org/xsd/3.3.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://releases.jfrog.io/artifactory/static-release-virtual/xsd/artifactory/artifactory-v3_3_5.xsd">
    ...
    <security>
        <hideUnauthorizedResources>false</hideUnauthorizedResources>
        <passwordSettings>
            <expirationPolicy>
    ...

这是artifactory.repository.config.latest.json:

{
    "localRepoConfigs":
    [
        {
            "type": "local",
            "key": "somerepo",
            "packageType": "conan",
            "baseConfig":
            {
                "modelVersion": 2,
                "description": "",
                "notes": "",
                "repoLayoutRef": "conan-default",
                "includesPattern": "**/*",
                "excludesPattern": ""
            },
            "repoTypeConfig":
            {
                "archiveBrowsingEnabled": false,
                "blackedOut": false,
                "propertySetRefs":
                [],
                "checksumPolicyType": "client-checksums",
                "priorityResolution": false,
                "maxUniqueSnapshots": 0,
                "handleReleases": true,
                "handleSnapshots": true,
                "snapshotVersionBehavior": "unique"
            },
            "packageTypeConfig":
            {
                "forceConanAuthentication": "false"
            },
            "securityConfig":
            {
                "hideUnauthorizedResources": false,
                "signedUrlTtl": 90
            },
            "repoType": "LOCAL"
        }
    ]
    ...
}

所以,我的问题是,我错过了什么?为什么我得到的是 404 而不是 401/403?

artifactory
  • 1 1 个回答
  • 93 Views

1 个回答

  • Voted
  1. Best Answer
    TheCleaner
    2024-10-01T00:15:50+08:002024-10-01T00:15:50+08:00

    尝试将 forceConanAuthentication 设置为 true 并重新启动服务,看看它是否正常工作?false 是正确的设置,但将其设置为 true 可能会给您带来 404 以外的其他信息并允许它正常工作。

    • 1

相关问题

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve