You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Go to file
zeripath 01c10a951b
Fix ssh deploy and user key constraints (#1357) (#5939)
1. A key can either be an ssh user key or a deploy key. It cannot be both.
2. If a key is a user key - it can only be associated with one user.
3. If a key is a deploy key - it can be used in multiple repositories and the permissions it has on those repositories can be different.
4. If a repository is deleted, its deploy keys must be deleted too.

We currently don't enforce any of this and multiple repositories access with different permissions doesn't work at all. This PR enforces the following constraints:

- [x] You should not be able to add the same user key as another user
- [x] You should not be able to add a ssh user key which is being used as a deploy key
- [x] You should not be able to add a ssh deploy key which is being used as a user key
- [x] If you add an ssh deploy key to another repository you should be able to use it in different modes without losing the ability to use it in the other mode.
- [x] If you delete a repository you must delete all its deploy keys.

Fix #1357
5 years ago
.github Force the PR close time to 60 days (#5770) 6 years ago
assets Add task to generate images from SVG and change to new logo (#2194) 7 years ago
cmd Fix ssh deploy and user key constraints (#1357) (#5939) 5 years ago
contrib Change systemd service file to more correctly match Debian & Centos - Fix #4391 (#5777) 6 years ago
custom/conf Make log mailer for testing (#5893) 5 years ago
docker Disable auto-migrate in docker container (#5730) 6 years ago
docs Make log mailer for testing (#5893) 5 years ago
integrations Fix ssh deploy and user key constraints (#1357) (#5939) 5 years ago
models Fix ssh deploy and user key constraints (#1357) (#5939) 5 years ago
modules Fix ssh deploy and user key constraints (#1357) (#5939) 5 years ago
options Fix ssh deploy and user key constraints (#1357) (#5939) 5 years ago
public Fix wrapping long code lines in UI (#5927) 5 years ago
routers Fix ssh deploy and user key constraints (#1357) (#5939) 5 years ago
scripts Update gitignore list (#5258) 6 years ago
snap Update build tags for sqlite_unlock_notify (#5144) 6 years ago
templates Add single commit API support (#5843) 5 years ago
vendor Add single commit API support (#5843) 5 years ago
.changelog.yml Add changelog config file for generate changelog (#2461) 7 years ago
.drone.yml Add migration test (#5773) 5 years ago
.editorconfig switch gitter to discord for drone. (#1971) 7 years ago
.gitattributes ignore static files statstics for linguist 8 years ago
.gitignore Added test environment for mssql (#4282) 6 years ago
.lgtm refactor: ignore LGTM from author of pull request. (#3283) 7 years ago
.revive.toml refactor: replace lint to revive (#5422) 6 years ago
BSDmakefile Add BSDmakefile to prevent errors when `make` is called under FreeBSD (#4446) 6 years ago
CHANGELOG.md 1.7.1 changelog (#5919) 5 years ago
CONTRIBUTING.md Update owners & Date in contributing (#5620) 6 years ago
DCO follow the advisor: add DCO and some improvements 8 years ago
Dockerfile Upgrade alpine to 3.8 (#5423) 6 years ago
Gopkg.lock Add single commit API support (#5843) 5 years ago
Gopkg.toml upgrade go-sql-driver/mysql to fix invalid connection error (#5748) 6 years ago
LICENSE Fix typo 8 years ago
MAINTAINERS Update @jonasfranz's username (#5619) 6 years ago
Makefile Add migration test (#5773) 5 years ago
README.md Update API link in README (#5241) 6 years ago
README_ZH.md Move README_ZH.md Screenshots to Bottom (#4895) 6 years ago
main.go Include Go toolchain to --version (#5830) 6 years ago
package-lock.json Update npm dependencies, regenerate CSS (#4415) 6 years ago
package.json Update npm dependencies, regenerate CSS (#4415) 6 years ago

README.md

简体中文

Gitea - Git with a cup of tea

Build Status Join the Discord chat at https://discord.gg/NsatcWJ codecov Go Report Card GoDoc GitHub release Help Contribute to Open Source Become a backer/sponsor of gitea

Purpose

The goal of this project is to make the easiest, fastest, and most painless way of setting up a self-hosted Git service. Using Go, this can be done with an independent binary distribution across all platforms which Go supports, including Linux, macOS, and Windows on x86, amd64, ARM and PowerPC architectures. Want to try it before doing anything else? Do it with the online demo! This project has been forked from Gogs since 2016.11 but changed a lot.

Building

From the root of the source tree, run:

TAGS="bindata" make generate all

More info: https://docs.gitea.io/en-us/install-from-source/

Using

./gitea web

NOTE: If you're interested in using our APIs, we have experimental support with documentation.

Contributing

Expected workflow is: Fork -> Patch -> Push -> Pull Request

NOTES:

  1. YOU MUST READ THE CONTRIBUTORS GUIDE BEFORE STARTING TO WORK ON A PULL REQUEST.
  2. If you have found a vulnerability in the project, please write privately to security@gitea.io. Thanks!

Further information

For more information and instructions about how to install Gitea, please look at our documentation. If you have questions that are not covered by the documentation, you can get in contact with us on our Discord server, or forum!

Authors

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

FAQ

How do you pronounce Gitea?

Gitea is pronounced /ɡɪti:/ as in "gi-tea" with a hard g.

Why is this not hosted on a Gitea instance?

We're working on it.

License

This project is licensed under the MIT License. See the LICENSE file for the full license text.

Screenshots

Looking for an overview of the interface? Check it out!

Dashboard Repository Commits History
Branches Issues Pull Request View
Releases Activity Wiki
Diff Organization Profile