Register Library on Gitlab

I understand that I can register my library with the Arduino Library Manager by forking this repo GitHub - arduino/library-registry: Arduino Library Manager list and adding my library repo to the list.

How can I do this from Gitlab? The instructions seem to suggest any public git repo will work - meaning if I add a library that is hosted at gitlab.com this should work, but how do I submit a pull request to add my update to main if I do this from Gitlab?

Do I need to create a Github account just to submit the pull request?

I think yes.
Despite the name similarity, GitLab and GitHub are completely different companies.

Are GitLab and GitHub the Same Company?

No, the two online services are offered by completely different companies. GitLab Inc. is a privately owned, fully remote company with 1,303 staff members. GitHub is a child company of Microsoft, with its main office in San Francisco and 1,600+ employees worldwide.

Well, yes, they are clearly separate companies. But they both utilize git. The git process for making a copy of a repository, making a branch, and requesting for the changes in your branch to be added to the main branch, are the same.

The issue is that the UI process for doing this differs between the two companies web interface.

library-registry/repositories.txt at main · arduino/library-registry · GitHub

This clearly shows Gitlab hosted libraries added to the library manager, so it's definitely possible to do, it just seems very roundabout for you to have to create a Github account, just to add your Gitlab repo URL to the file.

There is some information on stack exchange about setting a Github repo as the upstream for a Gitlab repo but these seems to be more about porting a repository over rather than having a Github repo merge changes made in a Gitlab repo.

Hi @jfrankl8.

Perhaps, but that is how it works. There is no way around it.

This is not anything specific to the arduino/library-registry project. A GitHub account is required in order to contribute directly to any repository maintained on GitHub, just as a GitLab account is required in order to do the same with a repository maintained on GitLab.com. Although the open core nature of the GitLab service is laudable, the unavoidable fact is that far more collaboration on open source is done on GitHub. So I think that any but the most stubborn software developer will eventually find the need to create a GitHub account even if their own projects are exclusively hosted on GitLab.com. So you will likely find the GitHub account useful for more than just submitting your libraries to the Library Manager registry.

But git itself is, in a sense, "decentralized" and platform agnostic. A request to update a repository with a commit diff should be as well.

For example, "git request-pull" should in theory achieve the same results.

Yes, in case if it a local repository.
To edit a repository on Github you must have an account.

Sadly, this isn't just stubbornness. Certain powers that be made a decision, for good reasons at the time, to commit to Gitlab and now I have the unfortunate responsibility of having to tell them that they should have used Github because I can't find a work around.

There is no need to do that. Simply create a free GitHub account and then submit a pull request to add the URL of the GitLab repository of the library to the repositories.txt file in the arduino/library-registry repository on GitHub. It will take a matter of minutes to complete the simple task and then you can forget all about GitHub after that if you like. You can even delete your GitHub account after that if you don't think you will ever want to use GitHub again.

Please note that there is no need for you to switch to using GitHub for hosting your own projects, including Arduino libraries. You are welcome to continue to use GitLab for that. It is only necessary to use GitHub when you want to contribute to repositories like arduino/library-registry that are hosted on GitHub.

I recommend you just give it a try. I think things will become more clear to you once you do it.

I know, but they aren't going to like having to also create a Github account. We are talking management here. They already went through some effort to secure gitlab.com/[company_name] and sadly, github.com/[company_name] is taken already. Even though we only need it to fork the library-registry repo and we can continue development gitlab, having to have 2 different accounts and not being able to have them both as /[company_name] is going to rub them raw. Marketing will get involved and it will be whole ordeal.

Anyway, I appreciate your feedback man.

Why not just create your own personal GitHub account and use that? Going through proper bureaucratic procedures makes good sense when undertaking some involved project, but when it is something utterly trivial like this sometimes you have to take the initiative and just get it done.

:wink: fallout mitigation.

While I have your ear, are the indexer log urls different for libraries hosted on Gitlab?

From the FAQ they should be

http://downloads.arduino.cc/libraries/logs/<host>/<repository slug>/

I would expect that
https://gitlab.com/zaber-core-libs/zaber-ascii-for-arduino
would have indexer logs at

https://downloads.arduino.cc/libraries/logs/gitlab.com/zaber-core-libs/zaber-ascii-for-arduino

But this comes up empty

Ahh never mind, missing the / at the end

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.