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.
zeripath fcb535c5c3
Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631)
This PR fixes #7598 by providing a configurable way of signing commits across the Gitea instance. Per repository configurability and import/generation of trusted secure keys is not provided by this PR - from a security PoV that's probably impossible to do properly. Similarly web-signing, that is asking the user to sign something, is not implemented - this could be done at a later stage however.

## Features
- [x] If commit.gpgsign is set in .gitconfig sign commits and files created through repofiles. (merges should already have been signed.)
- [x] Verify commits signed with the default gpg as valid
- [x] Signer, Committer and Author can all be different
    - [x] Allow signer to be arbitrarily different - We still require the key to have an activated email on Gitea. A more complete implementation would be to use a keyserver and mark external-or-unactivated with an "unknown" trust level icon.
- [x] Add a signing-key.gpg endpoint to get the default gpg pub key if available
    - Rather than add a fake web-flow user I've added this as an endpoint on /api/v1/signing-key.gpg
    - [x] Try to match the default key with a user on gitea - this is done at verification time
- [x] Make things configurable?
    - app.ini configuration done
    - [x] when checking commits are signed need to check if they're actually verifiable too
- [x] Add documentation

I have decided that adjusting the docker to create a default gpg key is not the correct thing to do and therefore have not implemented this.
5 years ago
..
tests/repos Fix reading git notes from nested trees (#8026) 5 years ago
README.md move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364) 5 years ago
blame.go Monitor all git commands; move blame to git package and replace git as a variable (#6864) 5 years ago
blame_test.go Monitor all git commands; move blame to git package and replace git as a variable (#6864) 5 years ago
blob.go Fixes #7292 - API File Contents bug (#7301) 5 years ago
blob_test.go Improve listing performance by using go-git (#6478) 5 years ago
cache.go move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364) 5 years ago
command.go Monitor all git commands; move blame to git package and replace git as a variable (#6864) 5 years ago
command_test.go move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364) 5 years ago
commit.go Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) 5 years ago
commit_archive.go move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364) 5 years ago
commit_info.go Removed unnecessary conversions (#7557) 5 years ago
commit_info_test.go Fix empty commits now showing in repo overview (#7521) 5 years ago
commit_test.go move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364) 5 years ago
error.go Improve listing performance by using go-git (#6478) 5 years ago
git.go Support git.PATH entry in app.ini (#6772) 5 years ago
git_test.go Only check and config git on web subcommand but not others (#7236) 5 years ago
hook.go Use gitea forked macaron (#7933) 5 years ago
notes.go Fix reading git notes from nested trees (#8026) 5 years ago
notes_test.go Fix reading git notes from nested trees (#8026) 5 years ago
parse.go Removed unnecessary conversions (#7557) 5 years ago
parse_test.go Improve listing performance by using go-git (#6478) 5 years ago
ref.go move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364) 5 years ago
repo.go Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) 5 years ago
repo_blame.go Removed unnecessary conversions (#7557) 5 years ago
repo_blob.go Removed unnecessary conversions (#7557) 5 years ago
repo_blob_test.go Improve listing performance by using go-git (#6478) 5 years ago
repo_branch.go IsBranchExist: return false if provided name is empty (#8485) 5 years ago
repo_branch_test.go move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364) 5 years ago
repo_commit.go Search Commits via Commit Hash (#7400) 5 years ago
repo_commit_test.go Be more strict with git arguments (#7715) 5 years ago
repo_commitgraph.go Use gitea forked macaron (#7933) 5 years ago
repo_compare.go Do not fetch all refs (#7797) 5 years ago
repo_compare_test.go Compare branches, commits and tags with each other (#6991) 5 years ago
repo_gpg.go Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) 5 years ago
repo_hook.go move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364) 5 years ago
repo_index.go Be more strict with git arguments (#7715) 5 years ago
repo_object.go Fixes #7292 - API File Contents bug (#7301) 5 years ago
repo_ref.go Removed unnecessary conversions (#7557) 5 years ago
repo_ref_test.go Show git-notes (#6984) 5 years ago
repo_stats.go Git statistics in Activity tab (#4724) 5 years ago
repo_stats_test.go Added missing error checks in tests (#7554) 5 years ago
repo_tag.go Strict name matching for Repository.GetTagID() (#8074) 5 years ago
repo_tag_test.go Strict name matching for Repository.GetTagID() (#8074) 5 years ago
repo_test.go Monitor all git commands; move blame to git package and replace git as a variable (#6864) 5 years ago
repo_tree.go Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) 5 years ago
sha1.go Improve listing performance by using go-git (#6478) 5 years ago
signature.go Improve listing performance by using go-git (#6478) 5 years ago
submodule.go Refactor submodule URL parsing (#7100) 5 years ago
submodule_test.go Refactor submodule URL parsing (#7100) 5 years ago
tag.go Fixes #2738 - Adds the /git/tags API endpoint (#7138) 5 years ago
tree.go Removed unnecessary conversions (#7557) 5 years ago
tree_blob.go Removed unnecessary conversions (#7557) 5 years ago
tree_entry.go Include "executable" files in the index, as they are not necessarily binary (#7718) 5 years ago
tree_entry_test.go Improve listing performance by using go-git (#6478) 5 years ago
utils.go Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) 5 years ago

README.md

Git Module

This module is merged from https://github.com/go-gitea/git which is a Go module to access Git through shell commands. Now it's a part of gitea's main repository for easier pull request.