Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8484685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:26:50+00:00 2026-06-10T20:26:50+00:00

I have a Git repository that I pull using a path similar to this:

  • 0

I have a Git repository that I pull using a path similar to this:

git pull ssh://username@host.com:1234/path/to/repository.git

When GitExtensions then tries to pull from the repository using plink, it makes this call:

plink -T username@host.com:/path/to/repository.git

This ends up failing because it’s actually pinging port #22, and not #1234.

The right call to make would be

plink -T -P 1234 username@host.com:/path/to/repository.git

If I create an alias "hostCom" in my ~/.ssh/config, it seems to work correctly (connecting to #1234) if I just do this:

plink -T username@hostCom

But as soon as I add the path to the Git repository too, it goes to #22 again.

Another option I tried is to create a session in PuTTY. Let’s call it "hostPutty", and set the default port there, etc. The bottom line ends up being the same though: Can’t combine path to Git repository with a custom port.

How do I combine all the parts to make them work?

And how come OpenSSH can deal with the problem, but PuTTY can’t? The only problem with OpenSSH is that it keeps asking me for the password for the private key on every connection attempt (and I don’t want to create a private key without a password).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:26:52+00:00Added an answer on June 10, 2026 at 8:26 pm

    I got it figured out.

    Here’s what got me down the wrong path:

    • Do not create any sessions in PuTTY as outlined here
    • Do not use any host aliases you might have defined in file ~/.ssh/config

    Here’s how you get it working:

    • Obviously make sure GitExtensions is set to use PuTTY, not OpenSSH
    • Make sure plink.exe (the one available with GitExtensions or specifically installed with PuTTY) is in a path without spaces
    • Set your environment variable %GIT_SSH% to point to plink.exe (it might be pointing to ssh.exe by default), make sure there aren’t apostrophes since the value will be used "as-is" (that’s why you can’t use spaces as stated above)
    echo %GIT_SSH%
    
    C:\tools\PuTTY\plink.exe
    
    • Use the "full" command to pull, without any host aliases that would allow you to not specify the port, etc., in the example above. If the port is missing, and there’s just a colon, Git treats it as a path separator, and ssh as the port delimiter (so they bite each fairly bad).

      git clone ssh://username@host.com:1234/path/to/repository.git

    If you do that, Git and plink actually figure things out right!

    If you don’t do it this way, you might run into all kinds of problems like:

    • I had %GIT_SSH% pointed to ssh.exe and used a host alias instead of path incl. the port

    ssh.exe": hostPutty:path: no address associated with name
    fatal: The remote end hung up unexpectedly

    • Used apostrophes in %GIT_SSH%

    error: cannot spawn "C:\tools\PuTTY\plink.exe": No such file or directory
    fatal: unable to fork

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a git repository that I am using and I've screwed up. I
I have a git repository that I'm trying to delete all files and folders
I have a central git repository that everyone pushes to for testing and integration,
Totally new to Capistrano. I have a local git repository that I want to
I have some old branches in my git repository that are no longer under
I have a folder in my Git repository that I'd like to move out
I have a particular file in a git source code repository that contains production
I have a project A that is a Git repository. I would like to
I have a central Git bare repository. When a push is made to that
Suppose I have Git repository like this: git-repo/ directory_1/ directory_2/ directory_3/ This has a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.