Skip to content

copr-distgit-client to support ssh-cloned repositories #95

Open

Description

@praiskup

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 git@github.com: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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions