pygit2 icon indicating copy to clipboard operation
pygit2 copied to clipboard

Is public key required?

Open 50nar opened this issue 6 years ago • 2 comments

Why is the public key required? Shouldn't public key only be installed in actual repo and client only needs the private key ?

Thanks,

50nar avatar Nov 09 '18 15:11 50nar

Has anyone tried just passing garbage for the public key? I'm trying to configure a gitfs backend in saltstack and hit this requirement after I was already knee deep into provisioning a server image without the public key.

It's simple enough to get the public key on the server, but adds one more thing to keep track of that doesn't seem relevant. Looking at the code I can't make out if it's even being used for anything.

I would try it myself, but I'm actually going to change course and just poll using git directly into a normal salt backend as the gitfs backend stack seems a little too shaky for production use.

jholloway7 avatar Jun 03 '20 14:06 jholloway7

Has anyone tried just passing garbage for the public key?

Won't work, since pygit2 expects a filesystem path. Also you cannot pass any valid path which is not a public key.

I encountered the same issue today and ended up re-creating my SSH credentials while keeping both keys (public & private) locally. After that I managed to push to my Gitea instance without any trouble.

MasterGroosha avatar Jun 12 '20 22:06 MasterGroosha