Dart/Flutter Pub - publish to lokal Server

186 Views Asked by At

We have a local Gitea server at http://git.ourname.local/ and since version 17, Gitea supports Package Registry. Now we want to use it with Flutter/Dart to host our own packages. We followed this instruction https://docs.gitea.io/en-us/packages/pub/ but at the step where we have to add out token, we get an error, that we can add tokens only for URLs with https. If we just change http to https, we can add the token but later if we want to publish the package, it is not working. That makes totally sense so far, because our Gitea is available via http and not https!

So our question is: How can we add a SSL certificate to our lokal server or how can we convince Pub to accept http and not only https or what other ways could work to solve our problem?

We hope someone of you have a smart idea for our problem...

1

There are 1 best solutions below

0
rashidotm On

Use a CA like https://letsencrypt.org/ then configure your server to use the certificate. I found this document detailing how to configure an SSL for Gitea configuring https. One last thing, servers ususally need to be restarted after config changes so ensure you restart your service to test your work.