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

`gh repo clone` doesn't use canonical capitalisation for remote URL #1845

Open
sersorrel opened this issue Sep 19, 2020 · 1 comment
Open

`gh repo clone` doesn't use canonical capitalisation for remote URL #1845

sersorrel opened this issue Sep 19, 2020 · 1 comment
Labels

Comments

@sersorrel
Copy link

@sersorrel sersorrel commented Sep 19, 2020

Describe the bug

If you clone e.g. https://github.com/HackSoc/uno by typing gh repo clone hacksoc/uno, then the remote URL will refer to hacksoc/uno.git when it should be capitalised as HackSoc/uno.git. This means that GitHub will complain at you when you push:

remote: This repository moved. Please use the new location:
remote:   git@github.com:HackSoc/uno.git
$ gh --version
gh version 1.0.0 (2020-09-16)
https://github.com/cli/cli/releases/tag/v1.0.0

Steps to reproduce the behavior

  1. Clone a repo via gh repo clone with uncanonical capitalisation
  2. Observe that the remote that gets configured has the same uncanonical capitalisation

Expected vs actual behavior

gh should use the canonical capitalisation for remote URLs, regardless of the capitalisation used in the shorthand username/repo input.

@sersorrel sersorrel added the bug label Sep 19, 2020
@mislav
Copy link
Member

@mislav mislav commented Sep 21, 2020

Excellent point. Thank you!

@vilmibm vilmibm added the repo label Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.