sigstore / gitsign

Keyless Git signing using Sigstore
Other
937 stars 61 forks source link

Cache option for Windows #497

Open Fydon opened 5 months ago

Fydon commented 5 months ago

Description

Using git config --global gitsign.connectorID https://github.com/login/oauth with gitsign and then perform multiple commits can result in reaching the secondary rate limit on calling the GitHub repository. Current cache option doesn't work on Windows as mention in #194.

image

Version

gitsign version v0.10.1
parsed config:
{
  "Fulcio": "https://fulcio.sigstore.dev",
  "FulcioRoot": "",
  "Rekor": "https://rekor.sigstore.dev",
  "RekorMode": "online",
  "ClientID": "sigstore",
  "RedirectURL": "",
  "Issuer": "https://oauth2.sigstore.dev/auth",
  "ConnectorID": "https://github.com/login/oauth",
  "TokenProvider": "",
  "TimestampURL": "",
  "TimestampCert": "",
  "LogPath": "",
  "CommitterName": "Foo",
  "CommitterEmail": "Bar",
  "MatchCommitter": false,
  "Autoclose": true,
  "AutocloseTimeout": 6
}
wlynch commented 5 months ago

I'm open to this, but I do not have any sort of Windows socket experience (or much experience building Windows apps in general). 😓

The first step would be to hide unix-specific syscalls behind a build flag:

$ GOOS=windows go build ./cmd/gitsign-credential-cache
# github.com/sigstore/gitsign/cmd/gitsign-credential-cache
./main.go:43:10: undefined: syscall.Umask