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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:01:57+00:00 2026-06-16T19:01:57+00:00

I have a git repository on my local machine that I push to github

  • 0

I have a git repository on my local machine that I push to github and a staging server, which is hosted with HostGator. I followed this guide to setup my staging server to allow me to push to it, which has worked well in the past.

After not pushing anything for about a month, I now see this error when I try to push to the staging server (where [hostname] is replaced with my url):

ssh: connect to host [hostname] port 22: Operation timed out
fatal: The remote end hung up unexpectedly

git remote -v shows:

bright  [user]@[hostname]:[path to repo] (fetch)
bright  [user]@[hostname]:[path to repo] (push)
origin  git@github.com:[reponame.git] (fetch)
origin  git@github.com:[reponame.git] (push)

The relevant portion of my .git/config is as follows:

[remote "[remote in question"]
    url = [user]@[hostname]:[path to repo]
    fetch = +refs/heads/*:refs/remotes/[remote]/*

It may be worth noting that when I ssh into this server, I use port 2222, but as you can see from the error message, git is trying to use port 22. I think that has always been the case though, even when this was working correctly.

What steps can I take to determine why the git push is timing out on my staging server?

  • 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-16T19:02:00+00:00Added an answer on June 16, 2026 at 7:02 pm

    Sounds like you may have setup port 2222 in your local ~/.ssh/config file. Maybe that config was replaced or removed?

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

Sidebar

Related Questions

I currently have a local Git repository, which I push to a Github repository.
I have a Git repository on my local machine that I cloned from my
Totally new to Capistrano. I have a local git repository that I want to
Trying to set-up a git server on my local dev machine and have been
I have set up a git repository on my local machine and a bare
I have various Git projects that are on my local machine. I have a
Suppose I have Git repository like this: git-repo/ directory_1/ directory_2/ directory_3/ This has a
I have a git repository that I'm trying to delete all files and folders
I have a Git repository in bitbucket and another on my live rails server,
I have a git repository hosted on BitBucket, and have set up SSH authentication

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.