Re: Git credential-cache manager is not treating `path=` correctly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 23, 2023 at 11:02:44PM +0200, Ganriel Nützi wrote:

> What I did not get from the documentation ist that a “store” of a
> generic (without path) credential , e.g https://www.server.com will
> just overwrite the more specific ones already in there. (So that is
> the case in my test, right? And the prompt happens in the first fill
> because useHttpPath=true but there is nomore any credential entry in
> the cache which would match (only the generic but that does not
> match), right?)

Right, exactly. It's possible that other helpers may behave differently
here, but certainly the scheme used by both "store" and "cache" is to
delete/replace anything that matches with the new credential.

> I am not sure but I thought that using cache is safer than store
> because i generally dont want to have credentials on a disk.

It is safer. I used the "store" one while testing because it is easy to
look at its internal state at any point with "cat ~/.git-credentials". :)

But the same logic should apply to "cache", and my "use two helpers"
trick should work by giving it a separate socket, like:

  [credential]
  helper = cache

  [credential "https://www.server.com/repos/1.git";]
  # separate socket/daemon for path-respecting entries
  helper =
  helper = credential --socket=$HOME/.git-credential-cache/socket-path
  useHttpPath = true

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux