git - OPAM 无法发布包 - 说 git 无法获取
问题描述
我正在尝试使用此处的说明发布 opam 包: https ://opam.ocaml.org/doc/Packaging.html
我确实创建了一个标签并将其推送到 github 上。当我尝试在 opam 上发布它时,opam publish
我收到以下错误消息:
Fetching the package repository, this may take a while...
[ERROR] Uncaught exception: "/usr/bin/git fetch --multiple origin user" exited with code 128 "fatal: No such remote or remote group:
user"
我是否错误地设置了 git 存储库,或者我的 opam 安装需要一些调整才能使其正常工作?
解决方案
也许在你看到这个错误之前
/usr/bin/git fetch --multiple origin user" exited with code 128 "fatal: No such remote or remote group: user
您错过了一个401 Unauthorized
错误,这与较新的github-unix
包中的错误与 GitHub 弃用 API 有关。
这是我为清理它所做的。
清理剩余的 opam-publish 状态
rm -rf ~/.opam/plugins/opam-publish/repos/ocaml%opam-repository
rm -f ~/.opam/plugins/opam-publish/ocaml%opam-repository.token
将 github-unix 降级到 <4.3.0
opam install github-unix.4.2.0
再跑opam publish
。
参考
推荐阅读
- python - 查找图中顶点之间的所有路径
- maven - 未能执行目标 com.e-gineering:gitflow-helper-maven-plugin:2.2.0:enforce-versions
- asp.net - 在 Azure 上部署后设计混乱
- python - 如何优化 django 查询中的注释?
- python - 如何使用 Python 将表格转换为特定的 XML 格式?
- javascript - 链接到 javascript 的 href
- azure - 如何确保新创建的 prod azure 资源被策略锁定?
- php - Laravel - 服务容器中单例和实例绑定之间的区别
- node-red - 带有 TTS 响应的出站呼叫,包括 DTMF 输入
- amazon-web-services - 机械土耳其人:外部问题无法从请求者界面工作