mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-15 17:49:20 +08:00
0222623be9
* Explicitly disable Git credential helper
If the user running Gitea has configured a credential helper, Git
credentials might leak out of Gitea.
There are two problems with credential helpers when combined with Gitea:
1. Credentials entered by a user when doing a migration or setting up a
mirror will end up in the credential store. In the worst case, this
is the plain text file ~/.git-credentials.
2. Credentials in the credential store will be used for migrations and
mirrors by all users. For example, if user A sets up a mirror, their
credentials will be stored. If user B later sets up a mirror from the
same host and does not enter any credentials, user A's credentials
will be used.
This PR prepends -c credential.helper= to all Git commands to clear the
list of helpers. This requires at least Git version 2.9, as previous
versions will try to load an empty helper instead. For more details, see
|
||
---|---|---|
.. | ||
blob.go | ||
command.go | ||
commit_archive.go | ||
commit_info.go | ||
commit.go | ||
doc.go | ||
error.go | ||
git.go | ||
hook.go | ||
LICENSE | ||
parse.go | ||
ref.go | ||
repo_blame.go | ||
repo_blob.go | ||
repo_branch.go | ||
repo_commit.go | ||
repo_hook.go | ||
repo_object.go | ||
repo_pull.go | ||
repo_ref.go | ||
repo_tag.go | ||
repo_tree.go | ||
repo.go | ||
sha1.go | ||
signature.go | ||
submodule.go | ||
tag.go | ||
tree_blob.go | ||
tree_entry.go | ||
tree.go | ||
utils.go |