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

import from gogs /github. #30521

Closed
recorehosting opened this issue Apr 16, 2024 · 2 comments · Fixed by #30912
Closed

import from gogs /github. #30521

recorehosting opened this issue Apr 16, 2024 · 2 comments · Fixed by #30912
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Milestone

Comments

@recorehosting
Copy link

Description

import from gogs/github will faill unless you set the in app.ini under [repository] the DEFAULT_BRANCH to master

to reproduce:

add a repository to a user (gitea/data/gitea-repositories/user/
go in gui to user settingss -> Reposistories -> choose addapt files to import reposistory

the branch button on the imported repository will give a error 404

now set the in app.ini under [repository] the DEFAULT_BRANCH = master, restart gittea and try to import another one
or remove the imported one.

the branch button will work as expected

Don't forget to push the button "Delete any repositories that are missing their Git files" before importing the same repository again.

maby make a note of this the docs?

Gitea Version

1.221.11

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.25.1

Operating System

ubuntu/linux

How are you running Gitea?

using the lastest binary from gitea.com

Database

None

@lunny
Copy link
Member

lunny commented May 5, 2024

Can you reproduce this on https://try.gitea.io ? And can you give an example repository?

@yp05327 yp05327 added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label May 9, 2024
@yp05327
Copy link
Contributor

yp05327 commented May 9, 2024

I can reproduce it.

@yp05327 yp05327 added this to the 1.23.0 milestone May 9, 2024
lunny pushed a commit that referenced this issue May 9, 2024
Fix #30521

we should sync branches first, then detect default branch, or
`git_model.FindBranchNames` will always return empty list, and the
detection will be wrong.
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants