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

  • Home
  • SEARCH
  • 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 9181717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:23:07+00:00 2026-06-17T18:23:07+00:00

I have a strange problem with cloning a git repository from an amazon ec2

  • 0

I have a strange problem with cloning a git repository from an amazon ec2 server. It works without any problems on one of my computers running ubuntu 12.04, while on another one using 12.10 it gives me an error:

ssh: Could not resolve hostname ec2server: Name or service not known  
fatal: The remote end hung up unexpectedly

It’s like it is not recognizing my config file. I use the following git command to clone :

sudo git clone ec2server:/var/www/project.git

or

sudo git clone ec2xxx.compute-1.amazonaws.com:/var/www/project.git

The two config files are identical on both computers, inside the ~./ssh with the following content:

Host ec2server
   Hostname ec2XXX.compute-1.amazonaws.com
   User ubuntu
   IdentityFile ~/.ssh/mykey.pem

If I substitute the ec2server with the actual address I get the following error:

Cloning into 'project'...
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

Thanks in advance.

  • 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-17T18:23:09+00:00Added an answer on June 17, 2026 at 6:23 pm

    Recently I had to re-install the system which held the working configuration and I have not managed to replicate it, so it’s not about the linux version (very likely). What I managed to do, is that I managed to use the mentioned original script to clone the repository into my home directory. Here it picked up the name correctly, but if I navigated into /var/www, what I was doing before, it just gave me the same error: could ec2server not found … . So I figure the problem has to do something with the permissions + commands combination. If anyone can figure it out how to make it work, I will mark he’s response as a correct answer, until then I am marking mine as the correct one, since this is the closest to the correct.

    UPDATE

    I figured it out what was the problem: I had to change the permission on /var/www folder in order to be able to clone into that directory. Now it’s 777 ( used only for dev on a local machine).

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

Sidebar

Related Questions

We have very strange problem, one of our applications is continually querying server by
I have strange problem with receiving data from socket. On client im using air
I have a strange problem. I do this query in a node.js server using
I have strange problem. I have own remote repository and upload their plugin. Then
I have strange problem on my pc/server. I run query such as Select field1,
I have strange problem with run .exe program in my WebApplication. It works fine
I have very strange problem with Doxygen: I used it to create documentation from
I have some strange problem with PIL not resizing the image. from PIL import
I have strange problem with installation of SQL Server 2008 R2. I am trying
I have strange problem, with calling Lua function from C++. I have in Lua:

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.