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

Re: Push from an SSH Terminal

From
Jeff King <peff@peff.net>
Date
Feb 3, 2012, 21:35 UTC
Message-ID
<20120203213508.GC1890@sigill.intra.peff.net>
In-Reply-To
<CAG94OYxX5foffvaFLQv7=wXguGC2TLgccdDFrC+ERzv_gXZ=ug@mail.gmail.com>
On Fri, Feb 03, 2012 at 10:50:02AM -0500, Feanil Patel wrote:
Show 10 quoted lines
> I tried looking for an answer to my problem online without much luck,
> perhaps you can help me.  I'm SSHed from my laptop(Comp A) over to a
> computer(Comp B) that has my git repo on it. I made some changes and
> comitted them. Now I want to push them to my other server(Comp C). The
> repository is password protected so if I'm physically at Comp B, I get
> a gui prompt for my username and password. However Comp A does not
> have X Forwarding setup to Comp B so I can't get the gui interface for
> the username and password when I try to do the push.  Is there an
> alternative way to provide my credentials when doing a git push that
> does not require a gui?

Git should prompt you on the terminal (i.e., the ssh session) if it needs credentials. If it is not, and the terminal is accessible, it might be a bug. There were some fixes around this area that went into 1.7.9; you might try using that version.

Also, 1.7.9 ships with support for credential helper scripts, which can help you avoid putting in your password less frequently (see "git help credentials" in git 1.7.9).

-Peff
Previous: Junio C Hamano
Message 12 of 12 in “Push from an SSH Terminal”
  1. Feanil PatelFeb 3, 2012
  2. Neal GroothuisFeb 3, 2012
  3. Feanil PatelFeb 3, 2012
  4. Neal GroothuisFeb 3, 2012
  5. Jeff KingFeb 3, 2012
  6. Jeff KingFeb 3, 2012
  7. 1/2 prompt: clean up strbuf usageJeff King, Feb 3, 2012
  8. 2/2 prompt: fall back to terminal if askpass failsJeff King, Feb 3, 2012
  9. Junio C HamanoFeb 4, 2012
  10. Jeff KingFeb 4, 2012
  11. Junio C HamanoFeb 4, 2012
  12. Jeff KingFeb 3, 2012

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.