Web GUI never shows code after pushing existing local to empty Gitea remote #6579

Closed
opened 2025-11-02 07:00:07 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @timandrews335 on GitHub (Dec 23, 2020).

  • Gitea version (or commit ref): 1.13.0

  • Git version: 2.27.0.windows.1

  • Operating system: Windows 10

  • Running in the latest official Docker container from this tutorial https://docs.gitea.io/en-us/install-with-docker/

  • Database (use [x]):

    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:

    • Yes (provide example URL)
    • No
  • Log gist:

Web GUI never shows code after pushing existing local to empty Gitea remote

I've tried this several times, on two machines. I have an existing, local repo, and I create an empty gitea repo with the same name. I then add a remote origin to my local repo and push. The web GUI never shows my code. It just shows me the boiler plate information as far as how to clone a repo, or push an existing repo.

I then created a test folder locally, and cloned that repo that shows no code in the web GUI. The code is actually brought down.

So, it's as if the web GUI never updates if it was originally blank, and an existing repo is pushed. I've even tried making subsequent changes to my test local folder that I cloned successfully, pushed them up, and the web GUI still never updates.

Creating a gitea repo with a readme.MD and cloning that works fine.
...

Screenshots

It's a pretty generic screenshot, but my repo always shows this, even though there is code

https://i.imgur.com/oodChbN.png

Originally created by @timandrews335 on GitHub (Dec 23, 2020). - Gitea version (or commit ref): 1.13.0 - Git version: 2.27.0.windows.1 - Operating system: Windows 10 - Running in the latest official Docker container from this tutorial https://docs.gitea.io/en-us/install-with-docker/ - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - Log gist: <!-- It really is important to provide pertinent logs --> <!-- Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems --> <!-- In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini --> ## Web GUI never shows code after pushing existing local to empty Gitea remote I've tried this several times, on two machines. I have an existing, local repo, and I create an empty gitea repo with the same name. I then add a remote origin to my local repo and push. The web GUI never shows my code. It just shows me the boiler plate information as far as how to clone a repo, or push an existing repo. I then created a test folder locally, and cloned that repo that shows no code in the web GUI. The code is actually brought down. So, it's as if the web GUI never updates if it was originally blank, and an existing repo is pushed. I've even tried making subsequent changes to my test local folder that I cloned successfully, pushed them up, and the web GUI still never updates. Creating a gitea repo with a readme.MD and cloning that works fine. ... ## Screenshots It's a pretty generic screenshot, but my repo always shows this, even though there is code https://i.imgur.com/oodChbN.png
Author
Owner

@zeripath commented on GitHub (Dec 23, 2020):

Only Gitea is allowed to use its repositories.

You must not touch them manually.
You must clone Gitea's repositories from either its http or ssh addresses.
You must push back to those addresses. You are absolutely not permitted to push to Gitea's repositories on the disk directly.

If you touch Gitea's repositories in any way other than the way Gitea expects you get to do your own fixing. We simply cannot support all of the various ways you could break things doing that.

If you want to clone from another place - use a migration.

If you want Gitea to adopt a repository - place it in the correct place and adopt it.

@zeripath commented on GitHub (Dec 23, 2020): Only Gitea is allowed to use its repositories. You must not touch them manually. You must clone Gitea's repositories from either its http or ssh addresses. You must push back to those addresses. You are absolutely not permitted to push to Gitea's repositories on the disk directly. If you touch Gitea's repositories in any way other than the way Gitea expects you get to do your own fixing. We simply cannot support all of the various ways you could break things doing that. If you want to clone from another place - use a migration. If you want Gitea to adopt a repository - place it in the correct place and adopt it.
Author
Owner

@timandrews335 commented on GitHub (Dec 23, 2020):

You are absolutely not permitted to push to Gitea's repositories on the disk directly.
Not sure what you mean by that, since I didn't do that. (did you reply to the incorrect issue?)

I just followed the instructions that gitea displays when a new, blank rep is created.

It says this, and that's what I did
git remote add origin http://myserver:3000/myuser/SomeRepo.git
git push -u origin master

@timandrews335 commented on GitHub (Dec 23, 2020): > You are absolutely not permitted to push to Gitea's repositories on the disk directly. Not sure what you mean by that, since I didn't do that. (did you reply to the incorrect issue?) I just followed the instructions that gitea displays when a new, blank rep is created. It says this, and that's what I did git remote add origin http://myserver:3000/myuser/SomeRepo.git git push -u origin master
Author
Owner

@timandrews335 commented on GitHub (Dec 23, 2020):

@zeripath
I also tried this from Ubuntu 20.04 (within WSL 2.0, which shouldn't matter as opposed to bare metal). I got the same result. The git push itself looks fine, but the web GUI never updates

Writing objects: 100% (3/3), 212 bytes | 106.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To http://myserver:3000/timandrews335/TestWSL.git
 * [new branch]      master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.

I then tried recreating the issue on try.gitea.io. It works fine there. Here is the repo:
https://try.gitea.io/timandrews335/TestWSL2

  • I made a new repo on my machine
  • I added a file on my machine
  • I staged and committed that new file
  • I made an empty repo on try.gitea.io
  • I then added that empty repo as my remote origin
  • I pushed up to try.gitea.io and my code shows up just fine
@timandrews335 commented on GitHub (Dec 23, 2020): @zeripath I also tried this from Ubuntu 20.04 (within WSL 2.0, which shouldn't matter as opposed to bare metal). I got the same result. The git push itself looks fine, but the web GUI never updates ``` Writing objects: 100% (3/3), 212 bytes | 106.00 KiB/s, done. Total 3 (delta 0), reused 0 (delta 0) To http://myserver:3000/timandrews335/TestWSL.git * [new branch] master -> master Branch 'master' set up to track remote branch 'master' from 'origin'. ``` I then tried recreating the issue on try.gitea.io. It works fine there. Here is the repo: https://try.gitea.io/timandrews335/TestWSL2 - I made a new repo on my machine - I added a file on my machine - I staged and committed that new file - I made an empty repo on try.gitea.io - I then added that empty repo as my remote origin - I pushed up to try.gitea.io and my code shows up just fine
Author
Owner

@timandrews335 commented on GitHub (Dec 24, 2020):

@zeripath
I tried an additional thing: I installed the latest turnkey LXC container via Proxmox. Everything works fine - pushing an existing local repo to a bare gitea repo shows the code in the web. So it must be something to do with the official Docker image.

@timandrews335 commented on GitHub (Dec 24, 2020): @zeripath I tried an additional thing: I installed the latest turnkey LXC container via Proxmox. Everything works fine - pushing an existing local repo to a bare gitea repo shows the code in the web. So it must be something to do with the official Docker image.
Author
Owner

@lunny commented on GitHub (Dec 24, 2020):

@timandrews335 Have you rename your gitea binary name or moved to a new place? If that, please remember regenerate the hooks on admin panel.

@lunny commented on GitHub (Dec 24, 2020): @timandrews335 Have you rename your gitea binary name or moved to a new place? If that, please remember regenerate the hooks on admin panel.
Author
Owner

@timandrews335 commented on GitHub (Dec 24, 2020):

@lunny
Hi Lunny. No, I didn't. I literally just did a docker-compose up -d and set the initial config.
I think later I'm going to try building a new yml and setting up again from scratch.

@timandrews335 commented on GitHub (Dec 24, 2020): @lunny Hi Lunny. No, I didn't. I literally just did a docker-compose up -d and set the initial config. I think later I'm going to try building a new yml and setting up again from scratch.
Author
Owner

@techknowlogick commented on GitHub (Dec 28, 2020):

Could the hooks be prevented from executing, perhaps on windows some AV software stops that. A common occurance on linux is that an external drive for storage is mounted as noexec.

@techknowlogick commented on GitHub (Dec 28, 2020): Could the hooks be prevented from executing, perhaps on windows some AV software stops that. A common occurance on linux is that an external drive for storage is mounted as noexec.
Author
Owner

@timandrews335 commented on GitHub (Dec 28, 2020):

@techknowlogick It was noexec FTW! I am running the container on OMV, and it adds noexec by default.

@timandrews335 commented on GitHub (Dec 28, 2020): @techknowlogick It was noexec FTW! I am running the container on OMV, and it adds noexec by default.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6579