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

1.7.0 lfs regression #5657

Closed
2 of 7 tasks
TankTheFrank opened this issue Jan 7, 2019 · 4 comments · Fixed by #5912
Closed
2 of 7 tasks

1.7.0 lfs regression #5657

TankTheFrank opened this issue Jan 7, 2019 · 4 comments · Fixed by #5912
Labels
Milestone

Comments

@TankTheFrank
Copy link

TankTheFrank commented Jan 7, 2019

  • Gitea version (or commit ref): 1.7.0-rc1/1.7.0-rc2
  • Git version: 2.19.2
  • Operating system: linux/armv7
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I'm using gitea with drone for ci. Up until 1.7.0 everything works fine but with 1.7.0 rc1/rc2 repositories with lfs cannot be cloned by drone. The repo is public but it fails with an authorization error.

Switching the binary back to 1.6.3 fixes everything again (keeping the same database, repos, config, etc that 1.7.0 used).

Downloading resources/assets/fonts/raleway/raleway-v12-latin-100.svg (59 KB)
Error downloading object: resources/assets/fonts/raleway/raleway-v12-latin-100.svg (7199b8d): Smudge error: Error downloading resources/assets/fonts/raleway/raleway-v12-latin-100.svg (7199b8d7358b032d9dcccf78ec238eda71ef303b12eb2e27a5a219c474bfac9b): 
    batch response: Git credentials for https://<repo_url - redacted>/info/lfs not found.

Edit:
This request returns 200 before 1.7.0, 401 in 1.7.0:

[D] LFS request - Method: POST, URL: /<repo>.git/info/lfs/objects/batch, Status 401
@lafriks lafriks added this to the 1.7.0 milestone Jan 7, 2019
TankTheFrank added a commit to TankTheFrank/gitea that referenced this issue Jan 18, 2019
We get the user's access token as user and "x-oauth-basic" as password. The "main" repository module already accepts this type of token so lfs should too.

drone.io uses this so lfs access to private repos is now granted and avoids the regression from go-gitea#5657 for my drone scenario (since drone with the default git plugin requests are already authenticated).
@lafriks lafriks modified the milestones: 1.7.0, 1.7.1 Jan 23, 2019
@lunny
Copy link
Member

lunny commented Jan 25, 2019

Have reproduced this: when you clone via http/https, it's ok. When you clone via SSH, it will failed because it http requires authentication, but no password provided and also git will not ask to input password.

@lafriks
Copy link
Member

lafriks commented Jan 25, 2019

@lunny it should not ask password for public repo

@lunny
Copy link
Member

lunny commented Jan 29, 2019

A public repo and REQUIRE_SIGNIN_VIEW is not set true, the password could not be ask.

@TankTheFrank
Copy link
Author

@lunny

The cloning is done via http/https in this case, not ssh. Drone always provides an auth token, even for public repos (see my commit linked for details). Maybe this token was completely missing in your tests when http/s worked?

The "main" repo itself is cloned just fine up until that batch lfs request.

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants