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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:06:37+00:00 2026-05-23T07:06:37+00:00

I have a situation where for size limitations, I can’t host the bare repository

  • 0

I have a situation where for size limitations, I can’t host the bare repository on the same server as a particular website. So I’ve setup a bare repository on server A which I want to push the master branch too when happy that the update is good.
In the hooks/post-update it should ssh to the live server and pull the master branch.

I’ve generated a public ssh key on the live server, authorized it and copied the public key into /var/www/.ssh/authorized_keys file on the bare repo server. Bascially done everything on this site here

But it’s failing when attempting to authenticate to the live server.

The post-update looks like this :

ssh liveuser@liveserver.com

cd cd/path/to/site/.git || exit
git pull bare master
exit

I get this message

$ git push server master
userForBare@www.ServerAAddress.com's password:
Counting objects: 5, done.
Delta compression using up to 3 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 279 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
remote:
remote: *** Pulling changes into Live [Live's post-update hook] ***
remote:
remote: Permission denied, please try again.
remote: Permission denied, please try again.
remote: Permission denied (publickey,gssapi-with-mic,password).
remote: fatal: The remote end hung up unexpectedly
To ssh://userForBare@www.ServerAAddress.com/var/git/websiteToUpdate.git
   b251909..883d129  master -> master
  • 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-23T07:06:38+00:00Added an answer on May 23, 2026 at 7:06 am

    You seem to run git pull on live, which means the live will ssh back into www.ServerAAddress.com. So there are 2 sshs that need to use passphrase-less public key for authentication and one of them is not correctly authorized:

    1. ssh from “A” (“bare”) to “live” needs private key (.ssh/id*) stored on “A” and public key (in .ssh/authorized_keys) on “live”.
    2. ssh from “live” back to “A” (inside the git pull) needs private key stored on “live” and public key on “A”. The keys should be different.

    The locations on the servers are probably different. The files on “A” need to be in userForBare‘s home, while files on “live” need to be in home of www user.

    Look in the logs (ssh usually logs into /var/log/auth or /var/log/security) and check that it’s actually finding the public keys it’s supposed to and that it’s willing to read it:

    • Many setups will not have /var/www as $HOME of the www user, so you may need to place the .ssh/authorized_keys elsewhere.
    • ssh refuses to read anything $HOME/.ssh/ if the file or any directory up to root is writable by anybody except that user or root, so if e.g. /var/www is group-writable, ssh will reject /var/www/.ssh/authorized_keys as possibly compromised.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a situation here. I have a redundant TCP server setup which takes
Here is the situation: I have multiple clients and one host. The message format&size
I have a huge server Subversion repository which I should move to an external
I have situation in which I read a record from a database. And if
I have situation where a user can manipulate a large set of data (presented
I have a situation wherein I have to keep the size of my flash
The situation: We have Windows 2008 web serverse with IIS7, (.NET4) We can comminicate
I can't figure out how to handle the following situation: I have a 9*9
I have the following situation: I have two threads thread1 , which is a
I have situation when one of tables rich size 2G and after it I

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.