git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC] git-secure: add explicit authentication before push or clone

From
VDVictor Duprez <duprezvictor4@gmail.com>
Date
Jul 26, 2025, 15:46 UTC
Message-ID
<1753544769-115114@smtp-cli>
Subject: [RFC] git-secure: add explicit authentication before push or clone
To: git@vger.kernel.org
From: Victor Duprez <duprezvictor4@gmail.com>
Hello Git community,
I would like to propose a new Git feature: a command called git-secure that prompts the user for authentication before executing sensitive Git operations such as git push or git clone.
Motivation:
Today, Git operations like push or clone can be executed as long as credentials (tokens or SSH keys) are available in the environment. While this is efficient, it presents some security risks:
- Users may inadvertently push changes without noticing.
- Machines may store tokens or SSH keys in accessible locations.
- In the case of theft or shared systems, these credentials could be silently misused.
Proposal:
Introduce a git-secure command (or option) that prompts the user interactively for either:
- A GitHub personal access token
- A simple password generated by a secure third-party password manager (optionally linked via API)
This token or password would be used only once, then securely discarded from memory and disk. It would provide an optional extra layer of control and security over Git operations, especially when working in untrusted environments.
Prototype:

A working prototype script is available here: https://github.com/VictorNafs/git-secure-hub

Example usage:

$ ./git-secure.sh Enter your GitHub token or generated password: GitHub username: Operation (push/clone):

Thank you for your time and feedback.
Message 1 of 1 in “[RFC] git-secure: add explicit authentication before push or clone”
  1. Victor DuprezJul 26, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.