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

Allowing push --dry-run through fetch url

From
Mike Hommey <mh@glandium.org>
Date
Nov 6, 2009, 07:37 UTC
Message-ID
<20091106073707.GA14881@glandium.org>
Hi,

I am currently considering, when I'll get some time, to dive in the git push code to allow push --dry-run without the rights to push.

We currently have two remote configuration items for urls: remote.<name>.url and remote.<name>.pushurl. The latter is used when pushing and the former when pulling/fetching.

The typical use of both at the same time is to put an authenticated value for pushurl (ssh://, for example) and an anonymous one (git://, for example) for url.

What has been annoying me lately is that git push --dry-run asks me for the ssh key or password. I know I could be using an ssh-agent, but that's not the point.

It would be interesting, to me at least, that git push --dry-run can do its job through the git:// url instead of the ssh:// one. But for now, all that does is telling me: fatal: The remote end hung up unexpectedly (probably because the git server doesn't allow pushes at all)

So, before I dive in, what would you think about such a feature?

There is one thing that bothers me, though, it's that --dry-run would, in the end, not really be a dry-run anymore, and, for example, could not be used to validate that the ssh setup is good without actually pushing.

Cheers,
Mike
Next: Junio C Hamano
Message 1 of 11 in “Allowing push --dry-run through fetch url”
  1. Mike HommeyNov 6, 2009
  2. Junio C HamanoNov 6, 2009
  3. Mike HommeyNov 6, 2009
  4. Junio C HamanoNov 6, 2009
  5. Mike HommeyNov 6, 2009
  6. Junio C HamanoNov 6, 2009
  7. Mike HommeyNov 6, 2009
  8. Junio C HamanoNov 8, 2009
  9. Mike HommeyNov 9, 2009
  10. Nanako ShiraishiDec 29, 2009
  11. Junio C HamanoDec 29, 2009

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.