Identifying a repository's ID in Bitbucket Server

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問


プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

要約

The Bitbucket Server repositories are located in BITBUCKET_HOME/shared/data/repositories/<repository-id> but which ID corresponds to which repository?

原因

Repositories are stored in Bitbucket Server's file system using a unique ID number instead of their name. 

ソリューション

The System Administrator permission is required to see the location on disk of the repository.

To determine the storage location of a repository, navigate to the repository in Bitbucket Server and select Settings. The location on disk will be displayed under Repository details. The numerical part of the path is the ID of the repository.

If you have access to the database.

Bulk Repository ID

If you have a few repositories, run a query to the Bitbucket Server database for the ID numbers similar to : 

SELECT name, id FROM <DataBase>.repository; 

This query will list all repositories and corresponding ID's.  If you have a lot of repositories or need more details you need to identify the repository you can run: 

SELECT r.NAME,
       r.id,
       r.slug,
       p.project_key
FROM   repository r
       JOIN project p
         ON r.project_id = p.id
WHERE  r.id = <Pathid>;

This query will list all repositories, their project keys, and corresponding ID's.


If you only have access to the repository on the file system, the ID is in the path. The repository name and project is included in the repository-config file found in the root of the repository.  Here is an example:

#>***********************************************
# THIS FILE IS MAINTAINED BY ATLASSIAN BITBUCKET
# IT CONTAINS NO USER-SERVICEABLE PARTS.
#>***********************************************
[bitbucket]
	hierarchy = 511398e6633cd8d5803d
	project = TEST
	repository = test



最終更新日: 2024 年 2 月 17 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.