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

500 when filename starts with ':' #2373

Closed
congeal opened this issue Jan 10, 2016 · 9 comments
Closed

500 when filename starts with ':' #2373

congeal opened this issue Jan 10, 2016 · 9 comments
Labels
💊 bug Something isn't working
Milestone

Comments

@congeal
Copy link

congeal commented Jan 10, 2016

I tried migrating an existing repo into Gogs, but it shows 500 server error.
Log message showed like below:
routers/repo/view.go:134 Home()
[E} GetCommitsInfo: GetCommitByPath (/:source): Length must be 40.
I found out that the filename ':source' caused the error.
After I renamed the filename to be without ':', pushed the original repo and retried migration, it works without any error.
However, since the name is still starting with ':' in the other branches, the error shows whenever I change the branches.
I'd like you to fix this problem so that I don't have to rename files staring with a colon.

@unknwon unknwon added 💊 bug Something isn't working status: needs reproduce Wait, how did that happen? labels Jan 10, 2016
@unknwon unknwon added this to the 0.9.0 milestone Jan 10, 2016
@unknwon
Copy link
Member

unknwon commented Jan 10, 2016

Thanks your report!

@unknwon unknwon changed the title Migration error due to a filename starting with ':'. Migration error due to a filename starting with ':' Jan 10, 2016
@unknwon
Copy link
Member

unknwon commented Jan 11, 2016

@congeal is that repository public so I can directly test against it?

Never mind, reproduced.

@unknwon unknwon changed the title Migration error due to a filename starting with ':' 500 when filename contains ':' Jan 11, 2016
@unknwon unknwon removed the status: needs reproduce Wait, how did that happen? label Jan 11, 2016
@unknwon unknwon changed the title 500 when filename contains ':' 500 when filename starts with ':' Jan 11, 2016
@congeal
Copy link
Author

congeal commented Jan 11, 2016

Yeah, you reproduced it! I think it has something to do with git-module that is another github project of yours.

@unknwon
Copy link
Member

unknwon commented Jan 11, 2016

Yes, I've found the way to solve it, working on it.

@congeal
Copy link
Author

congeal commented Jan 11, 2016

👍

unknwon added a commit to gogs/git-module that referenced this issue Jan 11, 2016
@unknwon
Copy link
Member

unknwon commented Jan 11, 2016

OK, go get -u github.com/gogits/git-module then recompile Gogs should solve the problem.

@unknwon unknwon added the status: needs feedback Tell me more about it label Jan 11, 2016
unknwon added a commit that referenced this issue Jan 11, 2016
- update required version of git-module for #2373
@unknwon
Copy link
Member

unknwon commented Jan 11, 2016

See in action: https://try.gogs.io/unknwon/issue-2373

@congeal
Copy link
Author

congeal commented Jan 12, 2016

I confirmed that the problem has gone.
Thank you a lot.

@unknwon
Copy link
Member

unknwon commented Jan 14, 2016

🍻

@unknwon unknwon removed the status: needs feedback Tell me more about it label Jan 14, 2016
@unknwon unknwon closed this as completed Jan 14, 2016
ethantkoenig pushed a commit to ethantkoenig/gogs that referenced this issue Sep 16, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💊 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants