由于 wget 检索失败 (404),Opam 发布失败

Opam publish fails due to wget retrieval failure (404)

简单地说,我有一个带有模块的库。我可以在 GitHub 存储库的本地版本中使用 opam install . 在本地安装它而不会出现问题,并且可以正常使用它。

按照说明 here,我创建了相应的 .opam 文件,使用 opam install . 对其进行了测试,并尝试通过 dune 使用它,并标记并推送了存档.

但是,当我尝试 运行 opam publish 时,出现以下错误:

[ERROR] Uncaught exception: OpamDownload.Download_fail(_, "Download command failed: \"/usr/local/bin/wget --content-disposition -t 3 -O
        /private/var/folders/zj/jsz2c_2x4blgtf_b14lfwl3r0000gn/T/opam-29567-5a61c5/archives/790f017e8273931983fa69cb4a5b6951-1.0.tar.gz.part https://github.com/[redacted]/[packageName]/archive/1.0.tar.gz -U opam/2.0.7\" exited with code 8
        \"2020-12-18 01:52:47 ERROR 404: Not Found.\"")

以下是各种可能相关的软件包的版本:

这是我的 .opam 文件的一般外观,并根据需要进行了一些编辑:

opam-version: "2.0"
name: "example"
version: "1.0"
synopsis: "This is essentially what my .opam file looks like but with the text redacted"
description: """
packageExample is a framework that is used for the sole purpose of being an example. It
does not actually do anything, and it in fact does not even really exist. All that
references this framework is this example representation of it in this .opam file.
"""
maintainer: "[Redacted] <[redacted@gmail.com]>"
authors: "[Redacted] <[redacted]@gmail.com>"
homepage: "https://github.com/[redacted]/example"
dev-repo: "git+https://github.com/[redacted]/example.git"
bug-reports: "https://github.com/[redacted]/example/issues"
doc: "[redacted]"
depends: [
    "ocaml" {>= "4.08.1"}
    "dune" {>= "2.7.1"}
    "base-bytes"
    "base-unix"
]
build: [
    ["dune" "build" "-p" name "-j" jobs]
    ["dune" "runtest" "-p" name "-j" jobs] {with-test}
    ["dune" "build" "@doc" "-p" name "-j" jobs] {with-doc}
]

答案是 GitHub 存储库必须 public 才能 opam publish 工作。去图吧。

此外,令牌的自动生成由于某种原因失败,所以我不得不从 https://github.com/settings/tokens 手动生成一个并提供它。