Capitalization discarded on push-to-create #12446

Closed
opened 2025-11-02 10:10:03 -06:00 by GiteaMirror · 9 comments
Owner

Originally created by @RGBCube on GitHub (Feb 7, 2024).

Description

I have enabled repository.ENABLE_PUSH_CREATE_USER and created a repo after pushing, my remotes are:

Test on  master took 2s
❯ git remote --verbose

origin  ssh://forgejo@rgbcu.be:2222/RGBCube/TestTwo (fetch)
origin  ssh://forgejo@rgbcu.be:2222/RGBCube/TestTwo (push)

But the repo created on my instance is named testtwo. Somewhere Gitea is lowercasing the repo name for case insensitiveness which is nice, but I'd like it to be preserved when push-to-create-ing for the first time.

Gitea Version

1.21.5

Can you reproduce the bug on the Gitea demo site?

Yes

Screenshots

image

How are you running Gitea?

NixOS module, irrelevant.

Database

PostgreSQL

Originally created by @RGBCube on GitHub (Feb 7, 2024). ### Description I have enabled `repository.ENABLE_PUSH_CREATE_USER` and created a repo after pushing, my remotes are: ``` Test on  master took 2s ❯ git remote --verbose origin ssh://forgejo@rgbcu.be:2222/RGBCube/TestTwo (fetch) origin ssh://forgejo@rgbcu.be:2222/RGBCube/TestTwo (push) ``` But the repo created on my instance is named `testtwo`. Somewhere Gitea is lowercasing the repo name for case insensitiveness which is nice, but I'd like it to be preserved when push-to-create-ing for the first time. ### Gitea Version 1.21.5 ### Can you reproduce the bug on the Gitea demo site? Yes ### Screenshots ![image](https://github.com/go-gitea/gitea/assets/78925721/0fd9717e-fc86-4c80-b7f3-32782b5503ce) ### How are you running Gitea? NixOS module, irrelevant. ### Database PostgreSQL
GiteaMirror added the type/bug label 2025-11-02 10:10:03 -06:00
Author
Owner

@yardenshoham commented on GitHub (Feb 7, 2024):

I tried reproducing but it looks ok to me.
image
image

@yardenshoham commented on GitHub (Feb 7, 2024): I tried reproducing but it looks ok to me. ![image](https://github.com/go-gitea/gitea/assets/20454870/d33f5037-cbb9-433f-9972-270cae59b30d) ![image](https://github.com/go-gitea/gitea/assets/20454870/a8fdc425-7f73-41ab-8e87-55a1469c603c)
Author
Owner

@jolheiser commented on GitHub (Feb 7, 2024):

My guess is it's specific to SSH:

5c0fc90872/cmd/serv.go (L219-L228)

@jolheiser commented on GitHub (Feb 7, 2024): My guess is it's specific to SSH: https://github.com/go-gitea/gitea/blob/5c0fc9087211f01375f208d679a1e6de0685320c/cmd/serv.go#L219-L228
Author
Owner

@RGBCube commented on GitHub (Feb 7, 2024):

My guess is it's specific to SSH:

5c0fc90872/cmd/serv.go (L219-L228)

Yup, I use SSH authentication for this

@RGBCube commented on GitHub (Feb 7, 2024): > My guess is it's specific to SSH: > > https://github.com/go-gitea/gitea/blob/5c0fc9087211f01375f208d679a1e6de0685320c/cmd/serv.go#L219-L228 Yup, I use SSH authentication for this
Author
Owner

@techknowlogick commented on GitHub (Feb 8, 2024):

@RGBCube is it the opensshd ssh implementation or the built-in to the binary ssh server you are using? The issue would likely apply to both, but just in case it doesn't this will help debug/fix. Thanks for the report :)

@techknowlogick commented on GitHub (Feb 8, 2024): @RGBCube is it the opensshd ssh implementation or the built-in to the binary ssh server you are using? The issue would likely apply to both, but just in case it doesn't this will help debug/fix. Thanks for the report :)
Author
Owner

@lunny commented on GitHub (Feb 8, 2024):

Line 227 and line 228, they should not be lowercase.

@lunny commented on GitHub (Feb 8, 2024): Line 227 and line 228, they should not be lowercase.
Author
Owner

@lunny commented on GitHub (Feb 8, 2024):

I tried reproducing but it looks ok to me. image image

You are using http protocol. User can try SSH protocol.

@lunny commented on GitHub (Feb 8, 2024): > I tried reproducing but it looks ok to me. ![image](https://private-user-images.githubusercontent.com/20454870/303081607-d33f5037-cbb9-433f-9972-270cae59b30d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDczNjAyMzEsIm5iZiI6MTcwNzM1OTkzMSwicGF0aCI6Ii8yMDQ1NDg3MC8zMDMwODE2MDctZDMzZjUwMzctY2JiOS00MzNmLTk5NzItMjcwY2FlNTliMzBkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMjA4VDAyMzg1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY2YmI4NGE1ZmFiMTU2N2Q0ZjU5NzBlMmMzZWIwYjZlZTgwYzg2MzFhZWY5NTBkMzU4ZGUzMGIzZjZkYzJhYWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.5Q1gopIGqxom6lnjeF3ETwYPSB9bgb72nzcp-odZZ9o) ![image](https://private-user-images.githubusercontent.com/20454870/303081809-a8fdc425-7f73-41ab-8e87-55a1469c603c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDczNjAyMzEsIm5iZiI6MTcwNzM1OTkzMSwicGF0aCI6Ii8yMDQ1NDg3MC8zMDMwODE4MDktYThmZGM0MjUtN2Y3My00MWFiLThlODctNTVhMTQ2OWM2MDNjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMjA4VDAyMzg1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZiMWEzMmU5Yjc2OTYyMTkzOGRlMTE0ZTI4NmEwYjhkMGVkMmIzNWJhZGNkZWU2Yzk0YjJkMTJlM2I1N2I0MDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.n0G7UtnuipROuTNemvzFVAJyB7aYHMgJTWJgZw-o-Uc) You are using http protocol. User can try SSH protocol.
Author
Owner

@RGBCube commented on GitHub (Feb 8, 2024):

@RGBCube is it the opensshd ssh implementation or the built-in to the binary ssh server you are using? The issue would likely apply to both, but just in case it doesn't this will help debug/fix. Thanks for the report :)

I'm using sshd at the moment (don't have the BUILTIN_SSH_SERVER option enabled)

@RGBCube commented on GitHub (Feb 8, 2024): > @RGBCube is it the opensshd ssh implementation or the built-in to the binary ssh server you are using? The issue would likely apply to both, but just in case it doesn't this will help debug/fix. Thanks for the report :) I'm using sshd at the moment (don't have the BUILTIN_SSH_SERVER option enabled)
Author
Owner

@lunny commented on GitHub (Feb 8, 2024):

The code affected both opensshd and builtin ssh server.

@lunny commented on GitHub (Feb 8, 2024): The code affected both opensshd and builtin ssh server.
Author
Owner

@github-actions[bot] commented on GitHub (Feb 28, 2024):

Automatically locked because of our CONTRIBUTING guidelines

@github-actions[bot] commented on GitHub (Feb 28, 2024): Automatically locked because of our [CONTRIBUTING guidelines](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#issue-locking)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12446