Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

copr-distgit-client to support ssh-cloned repositories

未关闭 适合新手
#95 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
65/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
git, github, python
领域
cli, devtools

调研方向

先阅读 copr_distgit_client.py 中 get_distgit_config 的处理路径,查看 traceback 所示的主机名查找附近的代码,然后追踪仓库远程 URL 的解析过程。使用提供的 SSH 克隆和配置重现问题,并与正常工作的 HTTPS origin 进行比较。当 SSH 克隆能够解析配置的 GitHub 主机,且 copr-distgit-client 执行完成时不再出现 KeyError,即为完成。

由索引模型根据 Issue 内容生成。

描述

With this config:

$ cat /etc/copr-distgit-client/konflux-fedora-rpms.ini 
[konflux-fedora-rpms]
clone_hostnames = github.com
path_prefixes = /konflux-fedora-rpm-packages
lookaside_location = https://src.fedoraproject.org
lookaside_uri_pattern = repo/pkgs/rpms/{name}/{filename}/{hashtype}/{hash}/{filename}
cloning_pattern = https://github.com/konflux-fedora-rpm-packages/{package}.git

When I have a clone from [email protected]:konflux-fedora-rpm-packages/libecpg.git I get
a failure:

$ copr-distgit-client 
Traceback (most recent call last):
  File "/usr/bin/copr-distgit-client", line 10, in <module>
    main()
  File "/usr/lib/python3.12/site-packages/copr_distgit_client.py", line 474, in main
    sources(args, config)
  File "/usr/lib/python3.12/site-packages/copr_distgit_client.py", line 224, in sources
    parsed_url, distgit_config = get_distgit_config(config, args.forked_from)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/copr_distgit_client.py", line 186, in get_distgit_config
    prefixes = config["clone_host_map"][hostname]
               ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'localhost'

Works fine with origin = https://github.com/konflux-fedora-rpm-packages/libecpg.git

主要语言
Python
星标
140
派生
40
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

release-engineering/dist-git 的其他 Issue

查看 release-engineering/dist-git 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。