Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exec: remove trailing slash from to-be-cloned URL #600

Merged
merged 1 commit into from
May 20, 2022

Conversation

ee7
Copy link
Member

@ee7 ee7 commented May 13, 2022

Under some circumstances, it seems that a trailing slash can cause
configlet sync to fail during the git clone part:

$ bin/configlet sync -e clock
Cloning https://github.com/exercism/problem-specifications/... failure
Cloning into '/Users/mark/Library/Caches/exercism/configlet/problem-specifications'...
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

The same user saw git clone fail with the trailing slash:

$ git clone https://github.com/exercism/problem-specifications/
Cloning into 'problem-specifications'...
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

but succeed without the trailing slash:

$ git clone https://github.com/exercism/problem-specifications
Cloning into 'problem-specifications'...
remote: Enumerating objects: 12177, done.
remote: Counting objects: 100% (1125/1125), done.
remote: Compressing objects: 100% (354/354), done.
remote: Total 12177 (delta 911), reused 843 (delta 769), pack-reused 11052
Receiving objects: 100% (12177/12177), 2.69 MiB | 3.23 MiB/s, done.
Resolving deltas: 100% (7363/7363), done.

There's no advantage from the trailing slash anyway. Let's remove it.

Fixes: #599
Refs: exercism/crystal#273


I believe it is more correct here for the URL not to end in .git.

Under some circumstances, it seems that a trailing slash can cause the
`git clone` to fail:

    $ bin/configlet sync -e clock
    Cloning https://github.com/exercism/problem-specifications/... failure
    Cloning into '/Users/mark/Library/Caches/exercism/configlet/problem-specifications'...
    ERROR: Repository not found.
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

The same user saw `git clone` fail with the trailing slash:

    $ code git clone https://github.com/exercism/problem-specifications/
    Cloning into 'problem-specifications'...
    ERROR: Repository not found.
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

but succeed without it:

    $ code git clone https://github.com/exercism/problem-specifications
    Cloning into 'problem-specifications'...
    remote: Enumerating objects: 12177, done.
    remote: Counting objects: 100% (1125/1125), done.
    remote: Compressing objects: 100% (354/354), done.
    remote: Total 12177 (delta 911), reused 843 (delta 769), pack-reused 11052
    Receiving objects: 100% (12177/12177), 2.69 MiB | 3.23 MiB/s, done.
    Resolving deltas: 100% (7363/7363), done.

The trailing slash shouldn't be there anyway. Let's remove it.

Fixes: 599
@ee7 ee7 requested a review from ErikSchierboom as a code owner May 13, 2022 10:09
@ee7 ee7 merged commit 4e06d08 into exercism:main May 20, 2022
@ee7 ee7 deleted the exec-remove-trailing-slash-from-url branch May 20, 2022 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sync: cloning prob-specs can fail due to trailing slash
2 participants