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 693663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:46:37+00:00 2026-05-14T02:46:37+00:00

I am trying to use ssh port forwarding to defeat corporate firewall: ssh git@GIT_SERVER

  • 0

I am trying to use ssh port forwarding to defeat corporate firewall:

ssh git@GIT_SERVER -L9418:GIT_SERVER:9418

and in another terminal I run

git clone git://localhost:repositories/project.git

But I get the following error:

Initialized empty Git repository in /Users/aboxer/tmp/glucosia/.git/

fatal: Unable to look up localhost (port repositories) (nodename nor servname provided, or not known)

Thanks!

  • 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-05-14T02:46:37+00:00Added an answer on May 14, 2026 at 2:46 am

    I’m pretty sure your problem (or at least the one causing this particular error) is here:

    git clone git://localhost:repositories/project.git
    

    If you look at the list of url notations in man git push you’ll see the relevant example:

    git://host.xz[:port]/path/to/repo.git/
    

    With the colon, you’re using “repositories” as the port name, and git (understandably) has trouble connecting to port repositories on local host! What you’re looking for is:

    git://localhost/path/to/repositories/project.git
    

    or perhaps

    git://localhost/~user/repositories/project.git
    

    Edit:

    I probably should’ve said this from the start, but I can’t actually think of a reason you’d need to use SSH tunneling with git. Its default transport protocol is ssh; the git protocol is really only present to allow public repositories to be fetched from without an account. If you can SSH into the machine where the repository is located, you can just fetch via ssh:

    git clone ssh://[user@]host.xz/path/to/repo.git
    git clone ssh://[user@]host.xz/~/path/to/repo.git
    git clone ssh://[user@]host.xz/~user/path/to/repo.git
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I've been trying to use the Net::SSH::Multi to login to multiple machines using
I was trying use a set of filter functions to run the appropriate routine,
i'm trying to use this ssh command in centos 5 to zip up a
I am trying to use pexpect to ssh into a computer but I do
I have msysgit installed with OpenSSH option. In Git bash, I can run ssh-agent,
I'm trying to run a command on a remote server via SSH from a
I'm trying to use Jsch to establish an SSH connection in Java. My code
I am using ubuntu behind a socks5 proxy and trying to use the git
I am trying to create a post update script and use git as a
I am able to use ssh (i.e., for 'git' with heroku or github etc.)

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.