www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Register DUB project hosted on CodeBerg?

reply Dejan Lekic <dejan.lekic gmail.com> writes:
OK, I get it - DUB does not support CodeBerg for whatever reason.

I copied the code to GitLab, and tried to register project using 
the GitLab repo URL: 
![Failure1](https://gcdnb.pbrd.co/images/nSB6OGAdyRIS.png?o=1)

I tried all sorts of URLs and got the same result. What is that 
`/?private_token=***` doing there?

At some point i tried the git remote URI, and got 
![Failure2](https://gcdnb.pbrd.co/images/k9WbxjuiUAe7.png?o=1)

Am I doing something wrong, or DUB registry has a bug that 
prevents from registering projects hosted on GitLab?
Nov 15
next sibling parent Mengu <mengukagan gmail.com> writes:
On Saturday, 15 November 2025 at 23:09:05 UTC, Dejan Lekic wrote:
 OK, I get it - DUB does not support CodeBerg for whatever 
 reason.

 I copied the code to GitLab, and tried to register project 
 using the GitLab repo URL: 
 ![Failure1](https://gcdnb.pbrd.co/images/nSB6OGAdyRIS.png?o=1)

 I tried all sorts of URLs and got the same result. What is that 
 `/?private_token=***` doing there?

 At some point i tried the git remote URI, and got 
 ![Failure2](https://gcdnb.pbrd.co/images/k9WbxjuiUAe7.png?o=1)

 Am I doing something wrong, or DUB registry has a bug that 
 prevents from registering projects hosted on GitLab?
What happens if you provide the https url? https://github.com/dlang/dub-registry/blob/f98bb9f45d95f46bd0ec6685361ddf2980dd43a8/views/my_packages.register.dt#L24
Nov 16
prev sibling next sibling parent reply =?UTF-8?Q?S=C3=B6nke_Ludwig?= <sludwig outerproduct.org> writes:
Am 16.11.25 um 00:09 schrieb Dejan Lekic:
 OK, I get it - DUB does not support CodeBerg for whatever reason.
 
 I copied the code to GitLab, and tried to register project using the 
 GitLab repo URL: ![Failure1](https://gcdnb.pbrd.co/images/ 
 nSB6OGAdyRIS.png?o=1)
 
 I tried all sorts of URLs and got the same result. What is that `/? 
 private_token=***` doing there?
 
 At some point i tried the git remote URI, and got ![Failure2](https:// 
 gcdnb.pbrd.co/images/k9WbxjuiUAe7.png?o=1)
 
 Am I doing something wrong, or DUB registry has a bug that prevents from 
 registering projects hosted on GitLab?
As far as I'm aware, code.dlang.org only supports a fixed set of public code hosting providers: https://github.com/ https://gitlab.org/ https://bitbucket.org/ It shouldn't be too hard to change the internal representation to allow assigning a URL and an API-type to each registered package instead, coupled with auto-detection of the API type at registration time. The main question would be how bad this would be in terms of opening up the attack surface of the overall system.
Nov 17
next sibling parent Dejan Lekic <dejan.lekic gmail.com> writes:
On Monday, 17 November 2025 at 08:39:01 UTC, Sönke Ludwig wrote:
 As far as I'm aware, code.dlang.org only supports a fixed set 
 of public code hosting providers:

 https://github.com/
 https://gitlab.org/
 https://bitbucket.org/

 It shouldn't be too hard to change the internal representation 
 to allow assigning a URL and an API-type to each registered 
 package instead, coupled with auto-detection of the API type at 
 registration time. The main question would be how bad this 
 would be in terms of opening up the attack surface of the 
 overall system.
Thanks Sönke! I will try gitlab.org instead of gitlab.com that I tried two days ago. How difficult it would be to allow both? Same question for codeberg.org - I have all my projects there, and have no plans of migrating elsewhere.
Nov 17
prev sibling parent Dejan Lekic <dejan.lekic gmail.com> writes:
On Monday, 17 November 2025 at 08:39:01 UTC, Sönke Ludwig wrote:
 As far as I'm aware, code.dlang.org only supports a fixed set 
 of public code hosting providers:

 https://github.com/
 https://gitlab.org/
 https://bitbucket.org/
OK, I have tried gitlab.org and it did not work. To provide context I want to register my https://gitlab.com/ddn/ddn.git project (actually I wanted to register my CodeBerg project, but CodeBerg is not supported). I tried the following in the registration form: - https://gitlab.org/ddn/ddn.git - git gitlab.org/ddn/ddn.git - gitlab.org/ddn/ddn.git In all three cases I was getting the following on the website:
 The provided URL does not match any supported provider 
 (GitHub/BitBucket/GitLab)
So obviously gitlab.org does not work, which does not surprise me because **gitlab.org does not work since 2015** !! (GitLab publicly announced retirement of the gitlab.org domain in August 2015)
Nov 17
prev sibling parent Dejan Lekic <dejan.lekic gmail.com> writes:
OK, I have found the issue.
I was pasting the clone URL from GitLab, which is either 
`https://gitlab.com/ddn/ddn.git` or `git gitlab.com:ddn/ddn.git`. 
After talking to the guys on Discord,  Hipreme especially 
(thanks!), I realised I should have tried without `.git` part and 
voila, it worked!

Perhaps a paragraph of each supported hosting provider example 
repo URL would be good in that form to make it more obvious what 
we need to type there.

Kind regards, and thanks all!
Nov 17