ssh-agent icon indicating copy to clipboard operation
ssh-agent copied to clipboard

suggestion: support for scoping organization level machine user ssh keys

Open leitmedium opened this issue 3 years ago • 0 comments

Hey,

it is currently supported to use comments for scoping ssh keys to specific repositories which works well with deployment keys that are bound to one repository. If you follow GitHub suggestion and make use of machine users and ssh keys for organization wide access to repositories you currently cannot scope them to a pattern like [email protected]/organization/ . This would however allow to juggle with different types of ssh keys. This applies to owner based matching, too, of course.

If I understand the code right, the easiest solution might be to just allow

const parts = key.match(/\bgithub\.com[:/]([_.a-z0-9-]+\/)/i);

But I might miss a part of replacement logic here.

Best,

Caspar.

leitmedium avatar Apr 11 '22 14:04 leitmedium