# Publishing from Codeberg

**URL:** https://discourse.julialang.org/t/publishing-from-codeberg/125363
**Category:** New to Julia
**Tags:** package
**Created:** [January 29, 2025, 9:09pm UTC](https://discourse.julialang.org/t/publishing-from-codeberg/125363 "2025-01-29T21:09:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Soel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/soel/32/214997_2.png) [@Soel](https://discourse.julialang.org/u/Soel)
#### Post date: [January 29, 2025, 9:09pm UTC](https://discourse.julialang.org/t/publishing-from-codeberg/125363/1 "2025-01-29T21:09:40Z")

</div>

Hello Julians,  
I am trying to publish a package… developing on codeberg ([codeberg.org](http://codeberg.org)), I wonder how to publish it from there.

Mirror it to github and try to register?

Thanks.

---

<div class="post-metadata">

### Author: ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)
#### Post date: [January 29, 2025, 10:12pm UTC](https://discourse.julialang.org/t/publishing-from-codeberg/125363/2 "2025-01-29T22:12:14Z")

</div>

Perhaps this conversation may be helpful :

> [@Registering packages not hosted on github](https://discourse.julialang.org/t/registering-packages-not-hosted-on-github/81912):
>
> Hi, Is it possible to register a package that is hosted not on GitHub/GitLab (Codeberg in my case)? Regards, Adam

---

<div class="post-metadata">

### Author: ![AdamWysokinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adamwysokinski/32/206422_2.png) [@AdamWysokinski](https://discourse.julialang.org/u/AdamWysokinski)
#### Post date: [January 29, 2025, 10:30pm UTC](https://discourse.julialang.org/t/publishing-from-codeberg/125363/3 "2025-01-29T22:30:03Z")

</div>

This is my way. Replace $GITHUB\_ACCOUNT and $GITHUB\_TOKEN with appropriate values.

```julia
cd ~/Documents/Code
rm -rf ~/Documents/Code/JuliaRegistry
gh repo delete https://github.com/$GITHUB_ACCOUNT//General --yes
gh repo fork https://github.com/JuliaRegistries/General --clone=false
git clone https://github.com/$GITHUB_ACCOUNT//General JuliaRegistry
cd JuliaRegistry
git checkout -b my-update
julia ~/Documents/Code/create_localregistry.jl "~/Documents/Code/JuliaRegistry"

```

go to your local repository

```julia
# the following step is necessary only if there are new packages added to dependencies
julia ~/Documents/Code/update_compat.jl

julia ~/Documents/Code/update_registry.jl "~/Documents/Code/JuliaRegistry"
cd ~/Documents/Code/JuliaRegistry
git push https://$GITHUB_TOKEN@github.com/$GITHUB_ACCOUNT/General.git

```

create a pull request  
wait till it is merged

```julia
rm -rf ~/.julia/registries/LocalRegistry
rm -rf ~/Documents/Code/JuliaRegistry

```

Done 🙂

Some additional scripts:

create\_localregistry.jl

```julia
using LocalRegistry
reg_path = expanduser(ARGS[1])
@assert isdir(reg_path) "The JuliaRegistry folder does not exist or was not provided."
@info "Creating LocalRegistry"
create_registry("LocalRegistry", reg_path, description = "LocalRegistry")
@info "Done"
exit()

```

update\_registry.jl

```julia
using LocalRegistry
using Pkg
reg_path = expanduser(ARGS[1])
@assert isdir(reg_path) "The LocalRegistry folder does not exist or was not provided."
@info "Updating LocalRegistry"
Pkg.activate(".")
register(registry=reg_path, push=false)
@info "Done"
exit()

```

update\_compat.jl

```julia
using Pkg
using PackageCompatUI
Pkg.activate(".")
compat_ui()

```

---

<div class="post-metadata">

### Author: ![Soel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/soel/32/214997_2.png) [@Soel](https://discourse.julialang.org/u/Soel)
#### Post date: [January 29, 2025, 10:47pm UTC](https://discourse.julialang.org/t/publishing-from-codeberg/125363/4 "2025-01-29T22:47:08Z")

</div>

Thanks for sharing sir. Just checked out your repo(s), nice projects. Keep going!
