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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:27:07+00:00 2026-05-18T08:27:07+00:00

I am setting up GIT on my server, when I SSH into my server

  • 0

I am setting up GIT on my server, when I SSH into my server I do:

ssh -i /path/to/key -p 30000 user@1.1.1.1

Now I setup GIT on the server, and I setup REMOTE like this:

remote add origin ssh://user@1.1.1.1:30000/path/to/git/repo/proj1

I’m getting the error:

push origin
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as ‘master’.
fatal: The remote end hung up unexpectedly
error: failed to push some refs to ‘ssh://user@1.1.1.1:30000/path/to/git/repos/proj1’

So far in my local repo I did:

touch .gitignore
git add .
git commit -m 'init'

And my server has a git bare in it.

UPDATE

git push origin

git push origin
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
fatal: The remote end hung up unexpectedly
error: failed to push some refs to 'ssh://git.myhost/home/myuser/gitrepos/csf'

My .ssh/config:

Host git.myhost
        User myuser
        Hostname 1.2.3.4
        Port 30000
        IdentityFile /home/myuser/.ssh/key_for_git
  • 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-18T08:27:07+00:00Added an answer on May 18, 2026 at 8:27 am

    How about set up your host information in .ssh/config file;
    in this way you won’t need the -i in both ssh and git.

    Edit: little Googling I find this

    https://git.wiki.kernel.org/index.php/GitTips#How_to_pass_ssh_options_in_git.3F

    So the only solution other than .ssh/config is to use $GIT_SSH environment variable.

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

Sidebar

Related Questions

I setup a git server over ssh as http://blog.commonthread.com/post/1034988660/setting-up-a-git-server However, I am still able
I have been working on setting up a git server by using Paramiko to
I am in the process of setting up a Git server (1.7.2.3) on a
am setting the parameters(key-value pairs - user name, password, email id) for NSMutableURLRequest(POST) using
I have tried following how-set-up-your-own-private-git-server-linux and private-remote-git-repositories-ubuntu-linode but I am still having problems. My
Setting up an integration server, I’m in doubt about the best approach regarding using
When setting up foreign keys in SQL Server, under what circumstances should you have
I'm having problems getting hudson to checkout my git repo and merge into master.
Which is efficient? SSH:// or Git:// (File compression) I understand in Git, git protocol
I have git repository (powered by gitosis) on my local ubuntu server I want

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.