Files
getting-started/README.md
2026-01-27 14:37:52 +00:00

102 lines
4.7 KiB
Markdown

# Getting Started with Gitea
This repository contains a README file with information to help new users get started with Gitea.
For questions not clarified here, missing information or corrections consider opening an [Issue](https://git.gecad.isep.ipp.pt/Administrator/getting-started/issues) on this repository or contacting someone named in [Additional Questions](#additional-questions).
## Index
1. [Permissions](#permissions)
2. [Migrating Repositories](#migrating-repositories)
1. [Gitea](#gitea-migration)
2. [Manual](#manual-migration)
3. [Teams/Organizations vs Personal Repositories](#teamsorganizations-vs-personal-repositories)
4. [Actions](#actions)
5. [Extra Information](#extra-information)
## Permissions
Gitea works on three permission levels:
- Public - Available for everyone to see
- Limited - Available only for authenticated users
- Private - Available only to the owner and invitees
The Limited permission level is only available to Users and Organizations, not to repositories. If you want to set your repositories to Limited, you have to set your account to Limited too.
## Migrating Repositories
### Gitea Migration
When creating a new repository, before the owner and name fields, a link to migrate a repository should appear.
There is a generic Git option with extra options for specific services. When migrating you will need to input a username and password or a token if the repository is private. For Github, check [GitHub Token](#github-token).
Introduce the URL for the repository to migrate, and your login credentials/token.
If you want, you can set the new repository to be a replica (Gitea will automatically fetch changes from the original repository if it is updated, and push new changes).
> [!Warning]
> Replicas can introduce merge conflics if work is being done on both sources at the same time.
Some options allow to migrate additional information, such as `Pull Requests`, `Issues` and `Tags`.
Set the owner and name for the migrated repository and Gitea will get it ready in a few minutes. If an error occurs, retrace your steps, try the [Manual Migration](#manual-migration) or contact someone.
#### GitHub Token
For GitHub, go to [Github Developer Settings (Personal Tokens)](https://github.com/settings/tokens) and create a new classic token with the `repo` scope.
Set the expiration date to any value you like.
After generating the token, copy it to Notepad, as you cannot see it after this and will have to create a new one.
### Manual Migration
> [!Note]
> For manual migrations, replication has to be set manually in the repository settings on Gitea.
To migrate a repository from any other platform to gitea manually, you need an updated version of the reposirory cloned on the local machine.
Create a new empty repository on gitea. (No .gitignore, no license, default README).
On the command line of the repository to migrate, run:
git remote set-url origin [link to repository]
git push -u origin main
After refreshing the repository page, all code should be uploaded, including the complete git history.
Your machine should now be tracking the new repository for both `pull` and `push`.
If other people use the repository, add them as colaborators (if needed), and instruct them to run:
git remote set-url origin [link to repository]
git fetch
You can verify wich URL/source you are tracking with:
git remote -v
For both `fetch` and `push`, the domain should be `git.gecad.isep.ipp.pt` if tracking Gitea.
## Teams/Organizations vs Personal Repositories
Organizations can be created to group multiple repositories under a single entity grouping multiple users. An example of this, is the [GECAD-N](https://git.gecad.isep.ipp.pt/GECAD-N) organization.
Repositories hosted by organizations are always available to their members, even if the original author of the repository looses access or no longer works for GECAD. Configuring organizations is complex and might not fit everyones work method.
Only the Gitea Administrators can create new organizations.
## Actions
Similar to GitHub, Gitea implements an Actions system. It can be setup under the `.github/workflows` or the `.gitea/workflows` folder. The syntax for the files is similar to GitHub's, making it possible to migrate current GitHub repositories to Gitea without major changes to the Actions.
Currently only exists ONE runner for actions. As not many repositories use this mechanism, available images and support may need to be expanded in the future.
## Extra information
### Administrators
- Rui Barbosa (rfpba)
- Luis Gomes (log)
- Luís Conceição (msc)
### Additional Questions
For issues not clarified in this document, contact Rui Barbosa (rfpba) or Luis Gomes (log).