Tags not showing in repository view after mirroring from Bitbucket #14619

Open
opened 2025-11-02 11:17:50 -06:00 by GiteaMirror · 15 comments
Owner

Originally created by @EnMaster on GitHub (Jun 18, 2025).

Description

Gitea version: 1.24.0
I'm mirroring repositories from Bitbucket to my local Gitea instance.
Every time I release a new version, I create a tag.

The issue is: in the repository view on Gitea, it says there are no tags.
However, if I check the push history, I can see that the tags were pushed correctly.

Is this a known issue? Do I need to run any manual action to refresh or sync the tags in the repository view?
Image

Gitea Version

1.24.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

local

Database

MySQL/MariaDB

Originally created by @EnMaster on GitHub (Jun 18, 2025). ### Description Gitea version: 1.24.0 I'm mirroring repositories from Bitbucket to my local Gitea instance. Every time I release a new version, I create a tag. The issue is: in the repository view on Gitea, it says there are no tags. However, if I check the push history, I can see that the tags were pushed correctly. Is this a known issue? Do I need to run any manual action to refresh or sync the tags in the repository view? ![Image](https://github.com/user-attachments/assets/90540519-cd0b-4d37-b94a-e91bea4eb63f) ### Gitea Version 1.24.0 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? local ### Database MySQL/MariaDB
GiteaMirror added the issue/needs-feedbacktype/bug labels 2025-11-02 11:17:50 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Jun 18, 2025):

Go to admin panel: Sync tags from git data to database | Run

@wxiaoguang commented on GitHub (Jun 18, 2025): Go to admin panel: Sync tags from git data to database | Run
Author
Owner

@EnMaster commented on GitHub (Jun 18, 2025):

Go to admin panel: Sync tags from git data to database | Run

Hi, i have already try this, but not work..
But, if i press the tag commit graph

Image

Image

@EnMaster commented on GitHub (Jun 18, 2025): > Go to admin panel: Sync tags from git data to database | Run Hi, i have already try this, but not work.. But, if i press the tag commit graph ![Image](https://github.com/user-attachments/assets/57499918-141e-4ece-8f75-b62f976d1916) ![Image](https://github.com/user-attachments/assets/65f235d8-b717-48d6-93eb-99a12526470c)
Author
Owner

@wxiaoguang commented on GitHub (Jun 18, 2025):

The commit tag list page shows the tags from the git repo, while the dropdown menu shows the tags from database.

Do you see any server side logs?

@wxiaoguang commented on GitHub (Jun 18, 2025): The commit tag list page shows the tags from the git repo, while the dropdown menu shows the tags from database. Do you see any server side logs?
Author
Owner

@EnMaster commented on GitHub (Jun 19, 2025):

I've enabled the log file,then press the action, from terminal go in "tail" but no error ( INFO level )

==> gitea.log <==
2025/06/19 06:55:25 cmd/web.go:207:serveInstalled() [W] Table secret column description db type is MEDIUMTEXT(16777215), struct type is TEXT
2025/06/19 06:55:25 routers/init.go:145:InitWebInstalled() [I] ORM engine initialization successful!
2025/06/19 06:55:25 .../indexer/issues/indexer.go:77:InitIssueIndexer.1() [I] PID 15411: Initializing Issue Indexer: bleve
2025/06/19 06:55:25 .../indexer/stats/indexer.go:41:populateRepoIndexer() [I] Populating the repo stats indexer with existing repositories
2025/06/19 06:55:25 .../indexer/issues/indexer.go:154:InitIssueIndexer.2() [I] Issue Indexer Initialization took 4.501947ms
2025/06/19 06:55:25 .../indexer/stats/indexer.go:87:populateRepoIndexer() [I] Done (re)populating the repo stats indexer with existing repositories
2025/06/19 06:55:25 cmd/web.go:323:listen() [I] Listen: http://0.0.0.0:3000
2025/06/19 06:55:25 cmd/web.go:327:listen() [I] AppURL(ROOT_URL): http://192.168.0.22:3000/
2025/06/19 06:55:25 cmd/web.go:330:listen() [I] LFS server enabled
2025/06/19 06:55:25 modules/graceful/server.go:50:NewServer() [I] Starting new Web server: tcp:0.0.0.0:3000 on PID: 15411
@EnMaster commented on GitHub (Jun 19, 2025): I've enabled the log file,then press the action, from terminal go in "tail" but no error ( INFO level ) ``` ==> gitea.log <== 2025/06/19 06:55:25 cmd/web.go:207:serveInstalled() [W] Table secret column description db type is MEDIUMTEXT(16777215), struct type is TEXT 2025/06/19 06:55:25 routers/init.go:145:InitWebInstalled() [I] ORM engine initialization successful! 2025/06/19 06:55:25 .../indexer/issues/indexer.go:77:InitIssueIndexer.1() [I] PID 15411: Initializing Issue Indexer: bleve 2025/06/19 06:55:25 .../indexer/stats/indexer.go:41:populateRepoIndexer() [I] Populating the repo stats indexer with existing repositories 2025/06/19 06:55:25 .../indexer/issues/indexer.go:154:InitIssueIndexer.2() [I] Issue Indexer Initialization took 4.501947ms 2025/06/19 06:55:25 .../indexer/stats/indexer.go:87:populateRepoIndexer() [I] Done (re)populating the repo stats indexer with existing repositories 2025/06/19 06:55:25 cmd/web.go:323:listen() [I] Listen: http://0.0.0.0:3000 2025/06/19 06:55:25 cmd/web.go:327:listen() [I] AppURL(ROOT_URL): http://192.168.0.22:3000/ 2025/06/19 06:55:25 cmd/web.go:330:listen() [I] LFS server enabled 2025/06/19 06:55:25 modules/graceful/server.go:50:NewServer() [I] Starting new Web server: tcp:0.0.0.0:3000 on PID: 15411 ```
Author
Owner

@wxiaoguang commented on GitHub (Jun 19, 2025):

I've enabled the log file,then press the action, from terminal go in "tail" but no error ( INFO level )

Don't "tail" only 10 lines ....

Actually, if these logs are what you saw after click "sync", then it means that Gitea crashes and restarts. Please provide enough logs.

@wxiaoguang commented on GitHub (Jun 19, 2025): > I've enabled the log file,then press the action, from terminal go in "tail" but no error ( INFO level ) Don't "tail" only 10 lines .... Actually, if these logs are what you saw after click "sync", then it means that Gitea crashes and restarts. Please provide enough logs.
Author
Owner

@EnMaster commented on GitHub (Jun 19, 2025):

By running systemctl status gitea.service, I confirmed that the process has been up since 6:55 AM, with no restarts occurring when pressing the "Sync Tags" button.

I then changed the log level from info to debug. Now, I can see detailed logs for all repositories when "Sync Tags" is pressed.

However, I noticed that some repositories are missing from the logs — even though they all have tags.

@EnMaster commented on GitHub (Jun 19, 2025): By running `systemctl status gitea.service`, I confirmed that the process has been up since 6:55 AM, with no restarts occurring when pressing the **"Sync Tags"** button. I then changed the log level from `info` to `debug`. Now, I can see detailed logs for all repositories when **"Sync Tags"** is pressed. However, I noticed that some repositories are missing from the logs — even though they all have tags.
Author
Owner

@wxiaoguang commented on GitHub (Jun 19, 2025):

Sorry, I am not able to guess what really happens with these information ...

Maybe you could try to find some key logs (for example, error or abnormal logs), or provide details steps to help to reproduce on a new instance

@wxiaoguang commented on GitHub (Jun 19, 2025): Sorry, I am not able to guess what really happens with these information ... Maybe you could try to find some key logs (for example, error or abnormal logs), or provide details steps to help to reproduce on a new instance
Author
Owner

@EnMaster commented on GitHub (Jun 19, 2025):

this is the log when press the sync tag button.

2025/06/19 22:05:20 .../queue/workergroup.go:161:(*WorkerPoolQueue).doStartNewWorker.1() [D] Queue "tag_sync" starts new worker
2025/06/19 22:05:20 modules/repository/repo.go:181:SyncReleasesWithTags() [D] SyncReleasesWithTags: in Repo[8:xxxx/project]
2025/06/19 22:05:20 modules/git/command.go:305:(*Command).run() [D] git.Command: git.Run(by:git.(*Repository).GetTagInfos.func1, repo:.../xxxx/project.git): /usr/bin/git ...global... for-each-ref "--format=objecttype %(objecttype)%00refname:lstrip=2 %(refname:lstrip=2)%00object %(object)%00objectname %(objectname)%00creator %(creator)%00contents %(contents)%00contents:signature %(contents:signature)%00%00" --sort -*creatordate refs/tags
2025/06/19 22:05:21 .../queue/workergroup.go:195:(*WorkerPoolQueue).doStartNewWorker.1() [D] Queue "tag_sync" stops idle worker
@EnMaster commented on GitHub (Jun 19, 2025): this is the log when press the sync tag button. ``` 2025/06/19 22:05:20 .../queue/workergroup.go:161:(*WorkerPoolQueue).doStartNewWorker.1() [D] Queue "tag_sync" starts new worker 2025/06/19 22:05:20 modules/repository/repo.go:181:SyncReleasesWithTags() [D] SyncReleasesWithTags: in Repo[8:xxxx/project] 2025/06/19 22:05:20 modules/git/command.go:305:(*Command).run() [D] git.Command: git.Run(by:git.(*Repository).GetTagInfos.func1, repo:.../xxxx/project.git): /usr/bin/git ...global... for-each-ref "--format=objecttype %(objecttype)%00refname:lstrip=2 %(refname:lstrip=2)%00object %(object)%00objectname %(objectname)%00creator %(creator)%00contents %(contents)%00contents:signature %(contents:signature)%00%00" --sort -*creatordate refs/tags 2025/06/19 22:05:21 .../queue/workergroup.go:195:(*WorkerPoolQueue).doStartNewWorker.1() [D] Queue "tag_sync" stops idle worker ```
Author
Owner

@EnMaster commented on GitHub (Jul 18, 2025):

Hi, I think I may have found the issue. All the tags I create using GitKraken are commits (lightweight) and not annotated tags. Could this be the reason why I can't see them in the GUI?

@EnMaster commented on GitHub (Jul 18, 2025): Hi, I think I may have found the issue. All the tags I create using GitKraken are commits (lightweight) and not annotated tags. Could this be the reason why I can't see them in the GUI?
Author
Owner

@lunny commented on GitHub (Jul 18, 2025):

Both types of tags should behave the same during synchronization. Are there any tags with the same name but different casing? Some database collation is case-insensitive.

@lunny commented on GitHub (Jul 18, 2025): Both types of tags should behave the same during synchronization. Are there any tags with the same name but different casing? Some database collation is case-insensitive.
Author
Owner

@EnMaster commented on GitHub (Jul 27, 2025):

What is the correct table? I checked the release table, but it’s completely empty. Its structure is as follows:

Image
@EnMaster commented on GitHub (Jul 27, 2025): What is the correct table? I checked the `release` table, but it’s completely empty. Its structure is as follows: <img width="1289" height="433" alt="Image" src="https://github.com/user-attachments/assets/2177fec5-c18e-48c3-93bf-0473ec4a1022" />
Author
Owner

@EnMaster commented on GitHub (Aug 6, 2025):

I tried the following actions:

  • Migrating the database from MySQL/MariaDB to PostgreSQL
  • Installing a fresh instance on a different machine with a clean database

In the first case, I didn't get any results, while in the second case the mirror successfully downloads and displays the tags in the GUI.

Table Structure Comparison

Old Installation

CREATE TABLE `release` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `repo_id` bigint(20) DEFAULT NULL,
  `publisher_id` bigint(20) DEFAULT NULL,
  `tag_name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `original_author` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `original_author_id` bigint(20) DEFAULT NULL,
  `lower_tag_name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `target` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `title` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `sha1` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL,
  `num_commits` bigint(20) DEFAULT NULL,
  `note` mediumtext COLLATE utf8mb4_bin,
  `is_draft` tinyint(1) NOT NULL DEFAULT '0',
  `is_prerelease` tinyint(1) NOT NULL DEFAULT '0',
  `is_tag` tinyint(1) NOT NULL DEFAULT '0',
  `created_unix` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UQE_release_n` (`repo_id`,`tag_name`),
  KEY `IDX_release_sha1` (`sha1`),
  KEY `IDX_release_repo_id` (`repo_id`),
  KEY `IDX_release_publisher_id` (`publisher_id`),
  KEY `IDX_release_tag_name` (`tag_name`),
  KEY `IDX_release_original_author_id` (`original_author_id`),
  KEY `IDX_release_created_unix` (`created_unix`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;

New Installation

CREATE TABLE `release` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `repo_id` bigint(20) DEFAULT NULL,
  `publisher_id` bigint(20) DEFAULT NULL,
  `tag_name` varchar(255) DEFAULT NULL,
  `original_author` varchar(255) DEFAULT NULL,
  `original_author_id` bigint(20) DEFAULT NULL,
  `lower_tag_name` varchar(255) DEFAULT NULL,
  `target` varchar(255) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `sha1` varchar(64) DEFAULT NULL,
  `num_commits` bigint(20) DEFAULT NULL,
  `note` text DEFAULT NULL,
  `is_draft` tinyint(1) NOT NULL DEFAULT 0,
  `is_prerelease` tinyint(1) NOT NULL DEFAULT 0,
  `is_tag` tinyint(1) NOT NULL DEFAULT 0,
  `created_unix` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UQE_release_n` (`repo_id`,`tag_name`),
  KEY `IDX_release_original_author_id` (`original_author_id`),
  KEY `IDX_release_sha1` (`sha1`),
  KEY `IDX_release_created_unix` (`created_unix`),
  KEY `IDX_release_repo_id` (`repo_id`),
  KEY `IDX_release_publisher_id` (`publisher_id`),
  KEY `IDX_release_tag_name` (`tag_name`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;

So, I also tried deleting the release table and recreating it, but it didn’t work either.

@EnMaster commented on GitHub (Aug 6, 2025): I tried the following actions: - Migrating the database from MySQL/MariaDB to PostgreSQL - Installing a fresh instance on a different machine with a clean database In the first case, I didn't get any results, while in the second case the mirror successfully downloads and displays the tags in the GUI. ### Table Structure Comparison #### Old Installation ```sql CREATE TABLE `release` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `repo_id` bigint(20) DEFAULT NULL, `publisher_id` bigint(20) DEFAULT NULL, `tag_name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL, `original_author` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL, `original_author_id` bigint(20) DEFAULT NULL, `lower_tag_name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL, `target` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL, `title` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL, `sha1` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL, `num_commits` bigint(20) DEFAULT NULL, `note` mediumtext COLLATE utf8mb4_bin, `is_draft` tinyint(1) NOT NULL DEFAULT '0', `is_prerelease` tinyint(1) NOT NULL DEFAULT '0', `is_tag` tinyint(1) NOT NULL DEFAULT '0', `created_unix` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `UQE_release_n` (`repo_id`,`tag_name`), KEY `IDX_release_sha1` (`sha1`), KEY `IDX_release_repo_id` (`repo_id`), KEY `IDX_release_publisher_id` (`publisher_id`), KEY `IDX_release_tag_name` (`tag_name`), KEY `IDX_release_original_author_id` (`original_author_id`), KEY `IDX_release_created_unix` (`created_unix`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC; ``` #### New Installation ```sql CREATE TABLE `release` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `repo_id` bigint(20) DEFAULT NULL, `publisher_id` bigint(20) DEFAULT NULL, `tag_name` varchar(255) DEFAULT NULL, `original_author` varchar(255) DEFAULT NULL, `original_author_id` bigint(20) DEFAULT NULL, `lower_tag_name` varchar(255) DEFAULT NULL, `target` varchar(255) DEFAULT NULL, `title` varchar(255) DEFAULT NULL, `sha1` varchar(64) DEFAULT NULL, `num_commits` bigint(20) DEFAULT NULL, `note` text DEFAULT NULL, `is_draft` tinyint(1) NOT NULL DEFAULT 0, `is_prerelease` tinyint(1) NOT NULL DEFAULT 0, `is_tag` tinyint(1) NOT NULL DEFAULT 0, `created_unix` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `UQE_release_n` (`repo_id`,`tag_name`), KEY `IDX_release_original_author_id` (`original_author_id`), KEY `IDX_release_sha1` (`sha1`), KEY `IDX_release_created_unix` (`created_unix`), KEY `IDX_release_repo_id` (`repo_id`), KEY `IDX_release_publisher_id` (`publisher_id`), KEY `IDX_release_tag_name` (`tag_name`) ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC; ``` So, I also tried deleting the `release` table and recreating it, but it didn’t work either.
Author
Owner

@lunny commented on GitHub (Aug 6, 2025):

release is the right table. Is there any error logs after you click the sync tags button?

@lunny commented on GitHub (Aug 6, 2025): `release` is the right table. Is there any error logs after you click the sync tags button?
Author
Owner

@EnMaster commented on GitHub (Oct 11, 2025):

UPDATE:
last night I upgraded the operating system (up to Debian 12) and the kernel. To my surprise, all the repository releases appeared.

Image
@EnMaster commented on GitHub (Oct 11, 2025): UPDATE: last night I upgraded the operating system (up to Debian 12) and the kernel. To my surprise, all the repository releases appeared. <img width="268" height="223" alt="Image" src="https://github.com/user-attachments/assets/38d4d12f-9b19-470d-8b4f-43b21a0274be" />
Author
Owner

@lunny commented on GitHub (Oct 11, 2025):

Have you upgraded database?

@lunny commented on GitHub (Oct 11, 2025): Have you upgraded database?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14619