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

Re: Can I use git protocol to push change to remote repo?

From
Jeff King <peff@peff.net>
Date
Dec 16, 2008, 07:38 UTC
Message-ID
<20081216073835.GA2468@coredump.intra.peff.net>
In-Reply-To
<856bfe0e0812152322i3a7fa376h8a35466b7abf82a5@mail.gmail.com>
On Tue, Dec 16, 2008 at 03:22:17PM +0800, Emily Ren wrote:
Show 5 quoted lines
> I can clone a remote repo with git protocol, but I can't push my
> branch to origin repo with git protocol. If I use ssh protocol, I can
> push sccuessfully. I'm confused, can someone give me a guide on this?
> Can I use git protocol to push my branch to remote repo? If yes, how
> can I do ? Thank you for your help in advance !

Yes, git-daemon does not support pushing by default, since it doesn't do any authentication of the pushing users. The recommended practice is to push over ssh, which uses the exact same protocol, but is tunneled over ssh, so the user is authenticated and the incoming data has an integrity check (note that pulling by ssh is also the same protocol as pulling via git://, except of course that it is also tunneled over ssh; this means that if you are pushing and pulling, you can just set your remote to talk to the ssh version).

If you _really_ want totally anonymous, unsecured pushing to your repo (e.g., because you are on a restricted LAN and everybody is trusted), you can enable the receive-pack service. See the git-daemon documentation for details.

-Peff
Previous: Emily RenNext: Emily Ren
Message 2 of 5 in “Can I use git protocol to push change to remote repo?”
  1. Emily RenDec 16, 2008
  2. Jeff KingDec 16, 2008
  3. Emily RenDec 16, 2008
  4. Jeff KingDec 16, 2008
  5. Emily RenDec 16, 2008

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.