git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Colin Stagner <ask+git@howdoi.land>
To: James <purpleidea@gmail.com>, git@vger.kernel.org
Subject: Re: Regression bug with latest SAFE ownership patch
Date: Sun, 18 Aug 2024 12:30:35 -0500	[thread overview]
Message-ID: <fe20f819-5b8e-4cca-a094-24e5d4333aa6@howdoi.land> (raw)
In-Reply-To: <CADCaTgpcmMbLoKR-rWf_roWfbgWJL6HuURDxwovvKQA8syf=vw@mail.gmail.com>

On 8/16/24 22:15, James wrote:
> I have a git repo which is on a shared server that I trust and control. Adding a safe.directory does _not_ allow me to use this repo anymore.

> james@computer1:~/whatever$ git remote show server2

> [remote "server2"]
>      url = ssh://root@server2:/home/someoneelse/whatever/
>      fetch = +refs/heads/*:refs/remotes/server2/*

I believe that safe.directory only affects repositories hosted on the 
local filesystem—and not on SSH or HTTP(S) remotes.

I would discourage cloning a user repository with the root user, or 
running git as root if you can at all avoid it.

Since you already have root access on this system, how difficult would 
it be to add your SSH key as an authorized_key for someoneelse? Then you 
could use ssh://someoneelse@server2:/home/someoneelse/whatever/.git as 
your remote.

You could also share repositories via a simple gatekeeper or forge, like 
gitolite.

Colin


      parent reply	other threads:[~2024-08-18 17:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-17  3:15 Regression bug with latest SAFE ownership patch James
2024-08-17 15:34 ` brian m. carlson
2024-08-18 17:30 ` Colin Stagner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe20f819-5b8e-4cca-a094-24e5d4333aa6@howdoi.land \
    --to=ask+git@howdoi.land \
    --cc=git@vger.kernel.org \
    --cc=purpleidea@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).