Skip to content

Gitea

Gitea Gitea is a lightweight code hosting solution, that will allow you to organize and publish your source code, manage repositories, organizations and their permissions.

Connected to a pipeline service, it will allow you to build easily a fully automatic CI/CD chain.


Note

In this tutorial, please replace the following values:

  • ZONE_NAME with the name of the administrative zone (it starts with ocb-).

Gitea access

In your administration environment, Gitea service is located at this address:

https://git.ZONE_NAME.caascad.com`

Login

Web UI

To be able to use Gitea you will need your Keycloak User / Password. For more info regarding Keycloak, please refer to Authentication page.

** For the first connection, you must go to the URL of your Gitea in order to link your Keycloak account to the local Gitea account.**

On the login page click on OpenID Connect button. You will be redirected to a Keycloak login page. Once your password entered you will be redirected back to Gitea.

If this is your first connection, you will be taken to the local account creation page.

Here, you can choose your Gitea username and password, but for more simplicity, we recommend to use the same as your Keycloak account without @domain.com (which is already pre-entered). For the password, it is a local password (owned by Gitea), so you can choose any value when creating your account for the first time (you can modify it after).

Shell GIT

For using git in a development IDE or as a shell command you need to login and there are two ways to do this: HTTPS or SSH. For HTTPS basic authentication, you can reuse your 'username' and 'password' from your Gitea account. We recommend however, SSH or GPG authentication that is more secure and more efficient. You don't need your 'username' and 'password', just your private certificate in your local development environment and your public key in your Gitea space.

In your personal Gitea space (Settings), in SSH/GPG Keys tab you can manage (visualize and import) the public keys associated with your account. You will also find a documentation link for generating a new key.

Token API

In order to use Gitea API and perform administrative actions like create/modify/delete repositories, users, teams and so on... you will need to generate specific Access Tokens.

These tokens grant access to your account using the Gitea API and can be generated in Applications tab of your user account Settings.

Link to the documentation is provided here

Or go directly to your Gitea on the api swagger page:

https://git.ZONE_NAME.caascad.com/api/swagger

Organization

To improve management of your Gitea instance, it is important to create a high-level context (here called organization) where you can give users specific permissions on, using teams or roles. This organization is dedicated to Gitea and independant of the one set up in Quay docker registry.

To create a new organization, you can go to the '+' icon in the upper right corner of your screen.

This page opens for the creation of your organization. You can choose the name and visibility.

Warning

If you are setting public visibility on an organization, every user that is authenticated in Gitea will be able see your organization/code.

After validation you can see your empty organization.

Team

This is optional but allows you to better organize permissions if you have a lot of users with different permissions.

In your organization click on New Team. Here you have all the customizable permissions of the person in this team. After creation you can add members to this Team.

Note

The Team is specific to one organization. You cannot reuse it for a different organization.

Repository

To create a repository you go to the '+' icon, in the upper right corner of your screen, or directly in your organization and on the button '+'

You can choose under which organization the repository is created: default organization that corresponds to your username or specific one.

Note

You are not able to set public visibility on repositories. Every new repository will have by default private visibility. However, if public visibility is needed, you can contact Caascad support team.

User Management

In addition to the permissions for your Organization and Team(s) you can configure additional permissions for each user. To do this go to the parameters of your Settings repository and to the tab Collaborators.

Note

You can only add users who have already made their first connection to the Gitea service.