Unable to clone self-hosted private GitLab repos via token
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- git, typescript
- 領域
- devops
調査の方向性
Start by tracing the GitLab repository discovery and cloning path, using the configuration and simple-git error output as entry points. Reproduce the self-hosted private repository case and verify the clone URL and token handling; done means repositories clone successfully over the intended protocol without authentication failures.
索引モデルが issue の本文から書いたものです。
説明
This may just be a configuration issue, but I'm having problems getting SourceBot to pull a self-hosted, private repository via a token. Here's my config:
{
"$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v2/index.json",
"repos": [
{
"type": "gitlab",
"url": "https://gitlab.SOME_HOST.com",
"token": "SOME_TOKEN",
"groups": [ "SOME_GROUP" ],
"exclude": {
"archived": true,
"repos": [
"SOME_PATH/**",
"SOME_OTHER_PATH",
"A_THIRD_PATH"
]
}
}
]
}
And here's the log output:
[Info] Sourcebot version: v2.8.2
[Info] Disabling telemetry since SOURCEBOT_TELEMETRY_DISABLED was set.
[Info] Using config file at: '/data/sourcebot-config.json'.
2025-02-21 19:50:38,667 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
2025-02-21 19:50:38,671 INFO supervisord started with pid 7
2025-02-21 19:50:39,674 INFO spawned: 'backend' with pid 390
2025-02-21 19:50:39,677 INFO spawned: 'web' with pid 391
2025-02-21 19:50:39,680 INFO spawned: 'zoekt' with pid 394
[web] | ▲ Next.js 14.2.21
[web] | - Local: http://localhost:3000
[web] | - Network: http://0.0.0.0:3000
[web] |
[web] | ✓ Starting...
[web] | ✓ Ready in 121ms
[backend] | 2025-02-21T19:50:40.424Z info: [main] Syncing configuration file /data/sourcebot-config.json ...
[backend] | 2025-02-21T19:50:40.490Z debug: [GitLab] Fetching project info for group SOME_GROUP...
2025-02-21 19:50:41,492 INFO success: backend entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2025-02-21 19:50:41,492 INFO success: web entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2025-02-21 19:50:41,492 INFO success: zoekt entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
[backend] | 2025-02-21T19:50:42.387Z debug: [GitLab] Found 29 projects in group SOME_GROUP in 1897ms.
[backend] | 2025-02-21T19:50:42.389Z debug: [GitLab] Found 29 total repositories.
[backend] | 2025-02-21T19:50:42.417Z info: [main] Discovered 29 unique repositories from config.
[backend] | 2025-02-21T19:50:42.447Z info: [main] Synced configuration file /data/sourcebot-config.json in 2.017s
[backend] | 2025-02-21T19:50:42.448Z info: [main] Cloning gitlab.SOME_HOST.com/SOME_GROUP/SOME_REPO...
[backend] | 2025-02-21T19:50:42.586Z error: [main] Cloning into bare repository '/data/.sourcebot/repos/gitlab.SOME_HOST.com/SOME_GROUP/SOME_REPO.git'...
[backend] | remote: HTTP Basic: Access denied. If a password was provided for Git authentication, the password was incorrect or you're required to use a token instead of a password. If a token was provided, it was either incorrect, expired, or improperly scoped. See http://gitlab.SOME_HOST.com/help/topics/git/troubleshooting_git.md#error-on-git-fetch-http-basic-access-denied
[backend] | fatal: Authentication failed for 'http://gitlab.SOME_HOST.com/SOME_GROUP/SOME_REPO.git/'
[backend] |
[backend] | Error: Cloning into bare repository '/data/.sourcebot/repos/gitlab.SOME_HOST.com/SOME_GROUP/SOME_REPO.git'...
[backend] | remote: HTTP Basic: Access denied. If a password was provided for Git authentication, the password was incorrect or you're required to use a token instead of a password. If a token was provided, it was either incorrect, expired, or improperly scoped. See http://gitlab.SOME_HOST.com/help/topics/git/troubleshooting_git.md#error-on-git-fetch-http-basic-access-denied
[backend] | fatal: Authentication failed for 'http://gitlab.SOME_HOST.com/SOME_GROUP/SOME_REPO.git/'
[backend] |
[backend] | at Object.action (file:///app/node_modules/simple-git/dist/esm/index.js:4462:25)
[backend] | at PluginStore.exec (file:///app/node_modules/simple-git/dist/esm/index.js:4501:25)
[backend] | at file:///app/node_modules/simple-git/dist/esm/index.js:1369:43
[backend] | at new Promise (<anonymous>)
[backend] | at GitExecutorChain.handleTaskData (file:///app/node_modules/simple-git/dist/esm/index.js:1367:16)
[backend] | at GitExecutorChain.<anonymous> (file:///app/node_modules/simple-git/dist/esm/index.js:1351:44)
[backend] | at Generator.next (<anonymous>)
[backend] | at fulfilled (file:///app/node_modules/simple-git/dist/esm/index.js:45:24)
[backend] | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[backend] | 2025-02-21T19:50:42.588Z info: [main] Cloning gitlab.SOME_HOST.com/SOME_GROUP/SOME_OTHER_REPO...
[backend] | 2025-02-21T19:50:42.671Z error: [main] Cloning into bare repository '/data/.sourcebot/repos/gitlab.SOME_HOST.com/SOME_GROUP/SOME_OTHER_REPO.git'...
[backend] | remote: HTTP Basic: Access denied. If a password was provided for Git authentication, the password was incorrect or you're required to use a token instead of a password. If a token was provided, it was either incorrect, expired, or improperly scoped. See http://gitlab.SOME_HOST.com/help/topics/git/troubleshooting_git.md#error-on-git-fetch-http-basic-access-denied
[backend] | fatal: Authentication failed for 'http://gitlab.SOME_HOST.com/SOME_GROUP/SOME_OTHER_REPO.git/'
[backend] |
[backend] | Error: Cloning into bare repository '/data/.sourcebot/repos/gitlab.SOME_HOST.com/SOME_GROUP/SOME_OTHER_REPO.git'...
[backend] | remote: HTTP Basic: Access denied. If a password was provided for Git authentication, the password was incorrect or you're required to use a token instead of a password. If a token was provided, it was either incorrect, expired, or improperly scoped. See http://gitlab.SOME_HOST.com/help/topics/git/troubleshooting_git.md#error-on-git-fetch-http-basic-access-denied
[backend] | fatal: Authentication failed for 'http://gitlab.SOME_HOST.com/SOME_GROUP/SOME_OTHER_REPO.git/'
[backend] |
[backend] | at Object.action (file:///app/node_modules/simple-git/dist/esm/index.js:4462:25)
[backend] | at PluginStore.exec (file:///app/node_modules/simple-git/dist/esm/index.js:4501:25)
[backend] | at file:///app/node_modules/simple-git/dist/esm/index.js:1369:43
[backend] | at new Promise (<anonymous>)
[backend] | at GitExecutorChain.handleTaskData (file:///app/node_modules/simple-git/dist/esm/index.js:1367:16)
[backend] | at GitExecutorChain.<anonymous> (file:///app/node_modules/simple-git/dist/esm/index.js:1351:44)
[backend] | at Generator.next (<anonymous>)
[backend] | at fulfilled (file:///app/node_modules/simple-git/dist/esm/index.js:45:24)
[backend] | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
(etc. -- continues for all remaining repos in the GitLab group)
Based on some quick testing on the command line, it appears this is due to SourceBot using HTTP instead of HTTPS when trying to clone the repositories. Is there a way to switch the "git clone" to use HTTPS?
- 主要言語
- TypeScript
- スター
- 3.9k
- フォーク
- 374
- 平均マージ
- 21時間 18分
- マージ済み PR(30日)
- 39
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sourcebot-dev/sourcebot のほかの issue
-
bug triage needed
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
sourcebot-dev/sourcebot#1681 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
sourcebot-dev/sourcebot#1633 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
sourcebot-dev/sourcebot#1384 · コメント 4 件 ·
-
ask_sb bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
sourcebot-dev/sourcebot#1137 · コメント 4 件 ·
-
bug triage needed
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
sourcebot-dev/sourcebot#1661 · コメント 1 件 ·
sourcebot-dev/sourcebot の issue をすべて見る
似ている issue
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Crush オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
ElementsProject/cln-application#167 · コメント 1 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Quantco/pnpm-licenses#17 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100