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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:35:16+00:00 2026-06-05T19:35:16+00:00

Summary For some reason, git commands don’t work the same when I am logged

  • 0

Summary

For some reason, git commands don’t work the same when I am logged in as root. For example, when I’m logged in as a normal user, I can clone a repository, but I can’t clone that same repo into the same directory as root.

Example

Normal User:

> git clone git@192.168.1.103:testing
Cloning into 'testing'...
Enter passphrase for key '/home/Matthew/.ssh/id_rsa': 
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 6 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (6/6), done.

(then I su to root and remove the repo…)

Root:

# git clone git@192.168.1.103:testing
Cloning into 'testing'...
Password:
Password:
Password:
Permission denied (publickey,keyboard-interactive).
fatal: The remote end hung up unexpectedly

My Troubleshooting Attempts

At first I assumed this was some sort of problem related to ssh, but ssh-ing from every way possible seems to work normally. (I did not change the setting to enable you to login directly as root via ssh.)

Setup Details

  • I’ve generated ssh keys for both the root and the other user.
  • the machine I’m trying to clone the repos to is running FreeBSD 9 (I just installed it- trying to learn about *nix, hosting, sys admin, etc.)
  • git server is gitolite on a mac (I’ve been using it for awhile without problems)

Conclusion

I have a feeling that this will be obvious to someone with more *nix/git chops, but I’ve failed so far to figure it out/find the answer on the interwebs. Thanks for any help!

  • 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-05T19:35:17+00:00Added an answer on June 5, 2026 at 7:35 pm

    The Problem

    Note that your mortal user isn’t being prompted for a password, but your super user is. That’s a big clue that root’s private key isn’t loaded into an accessible ssh-agent.

    The Solution

    After you su to root, you need to start your ssh-agent and load your keys. For example:

    sudo su - root
    eval `ssh-agent`
    ssh-add
    

    If your keys are visible in your agent using ssh-add -l then you should be able to successfully clone at this point.

    Caveats

    Since you’re using gitolite on the server, you can’t use password authentication–you must use public key authentication. To make this work, you will also need to make sure that you’ve added root’s public key to your gitolite configuration, and authorized the root user for whatever repositories you want that account to access.

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

Sidebar

Related Questions

I've written an example of my problem, for some reason (which I don't seem
I'm trying to build a custom configuration and with some reason, I can't get
I read through the docs and used the commands outlined however for some reason
Summary I am after some advice on the easiest way to analyze simple data
Summary of the problem: For some decimal values, when we convert the type from
Summary: I'm trying to do classification of some images depending on the angles between
Summary of the issue: When I am loading some data into my iPhone application
I have a Project model and it has some text attributes, one is summary.
I actually have two questions, both are probably simple, but for some odd reason
I've got a Vs2008 solution being build on TFS2010 and for some reason the

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.