# How to submit a patch?

**URL:** <https://forum.collaboraonline.com/t/how-to-submit-a-patch/4619>\
**Category:** Development\
**Created:** [April 22, 2026, 8:26pm UTC](https://forum.collaboraonline.com/t/how-to-submit-a-patch/4619 "2026-04-22T20:26:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Regina](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@Regina](https://forum.collaboraonline.com/u/Regina)\
**Post date:** [April 22, 2026, 8:26pm UTC](https://forum.collaboraonline.com/t/how-to-submit-a-patch/4619/1 "2026-04-22T20:26:39Z")

</div>

I have created a patch. It works for me as intended. I have created it with `git commit -m “…”`and checked with `git format-patch origin` that it contains what I expect. How do I submit the patch? With LibreOffice I would have done `./logerrit submit master`. How to do for CollaboraOffice? I’ve tried with `./cogerrit submit master`, but that does not work.

Or could I attach the patch here and someone else will take care of it?

---

<div class="post-metadata">

**Author:** ![bayramcicek](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/bayramcicek/32/2192_2.png) [@bayramcicek](https://forum.collaboraonline.com/u/bayramcicek)\
**Post date:** [April 22, 2026, 10:18pm UTC](https://forum.collaboraonline.com/t/how-to-submit-a-patch/4619/2 "2026-04-22T22:18:41Z")

</div>

Hi @Regina,

Please try `./cogerrit submit main`.

---

<div class="post-metadata">

**Author:** ![Regina](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@Regina](https://forum.collaboraonline.com/u/Regina)\
**Post date:** [April 23, 2026, 5:52am UTC](https://forum.collaboraonline.com/t/how-to-submit-a-patch/4619/3 "2026-04-23T05:52:07Z")

</div>

It results in error

> ssh: Could not resolve hostname cogerrit: Name or service not known  
> fatal: Could not read from remote repository.
> 
> Please make sure you have the correct access rights  
> and the repository exists.

For LibreOffice there is the instruction `https://wiki.documentfoundation.org/Development/gerrit/setup` Perhaps something similar is needed to be able to use `./cogerrit`?

---

<div class="post-metadata">

**Author:** ![darshan](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/darshan/32/2230_2.png) [@darshan](https://forum.collaboraonline.com/u/darshan)\
**Post date:** [April 23, 2026, 5:56am UTC](https://forum.collaboraonline.com/t/how-to-submit-a-patch/4619/4 "2026-04-23T05:56:26Z")

</div>

This is a DNS/SSH configuration issue — your system doesn’t know what host `cogerrit` refers to. Just like the LibreOffice guide sets up a `logerrit` alias, you need to set up a `cogerrit` alias pointing to Collabora’s Gerrit server.

Add to your `~/.ssh/config` file:

If you haven’t already, you’ll also need to:

1. **Create an account** on `gerrit.collabora.com` (typically via OAuth/GitHub login).
2. **Upload your SSH public key** to your Gerrit account settings — go to Settings → SSH Keys and paste the contents of your `~/.pub/id_rsa.pub` (or whichever key you use).
3. **Verify the connection** with `ssh cogerrit` — if it’s working, you’ll get a welcome message from Gerrit rather than a “could not resolve hostname” error.

After that, `./cogerrit` should be able to reach the remote repository.

---

<div class="post-metadata">

**Author:** ![Regina](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@Regina](https://forum.collaboraonline.com/u/Regina)\
**Post date:** [April 23, 2026, 7:00am UTC](https://forum.collaboraonline.com/t/how-to-submit-a-patch/4619/5 "2026-04-23T07:00:38Z")

</div>

> [@darshan](#):
>
> you need to set up a `cogerrit` alias pointing to Collabora’s Gerrit server.
> 
> Add to your `~/.ssh/config` file:

What do I have to add?

---

<div class="post-metadata">

**Author:** ![caolan](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/caolan/32/996_2.png) [@caolan](https://forum.collaboraonline.com/u/caolan)\
**Post date:** [April 23, 2026, 7:25am UTC](https://forum.collaboraonline.com/t/how-to-submit-a-patch/4619/6 "2026-04-23T07:25:25Z")

</div>

For the cogerrit thing, then:

“./cogerrit setup” guides through the process and outputs what you need  
at the end, it should be something like:

Host cogerrit [gerrit.collaboraoffice.com](http://gerrit.collaboraoffice.com)  
IdentityFile ~/.ssh/SOMETHING  
User USERID  
Port 29418  
HostName [gerrit.collaboraoffice.com](http://gerrit.collaboraoffice.com)

---

<div class="post-metadata">

**Author:** ![Regina](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@Regina](https://forum.collaboraonline.com/u/Regina)\
**Post date:** [April 23, 2026, 10:47am UTC](https://forum.collaboraonline.com/t/how-to-submit-a-patch/4619/7 "2026-04-23T10:47:04Z")

</div>

> [@caolan](#):
>
> ./cogerrit setup

Done. But `./cogerrit test` results in

> The authenticity of host ‘[gerrit.collaboraoffice.com]:29418 ([46.225.79.241]:29418)’ can’t be established.  
> ED25519 key fingerprint is: SHA256:RhodxEP7DI0+yMjdvGEagHU3f24usYh4kdeLJYeVC2A  
> This key is not known by any other names.  
> Are you sure you want to continue connecting (yes/no/[fingerprint])?

I continued with `yes` and have got

> There seems to be trouble. Please have the output of:  
> ssh -vvvv cogerrit  
> at hand when looking for help.

The long output from `ssh -vvvv cogerrit` contains the text

> \*\*\*\* Welcome to Gerrit Code Review \*\*\*\*
> 
> Hi regina-henschel, you have successfully connected over SSH.
> 
> Unfortunately, interactive shells are disabled.  
> To clone a hosted Git repository, use:
> 
> git clone ssh://regina-henschel@gerrit.collaboraoffice.com:29418/REPOSITORY\_NAME.git

Does that mean, that I need to start with this new `git clone` , apply my patch, create a commit and then use `./cogerrit main`? It turned out that `./cogerrit main`does not work, but the above mentioned `./cogerrit submit main ` works 🙂

(What is actually needed instead of `REPOSITORY_NAME`? Found it, has to be `core`)
