macOS: use authentication information from git credential-osxkeychain
Created by: tillhainbach
Describe the feature or problem you'd like to solve
On macOS the default secure location to store sensible information (like tokens, passwords, etc.) is keychain. GitHub CLI and git both store authentication information there. This avoids saving tokens in plain text files.
Propose a Solution
Use git's credential-osxkeychain to set/get login credentials
Additional context
As far as I know git itself calls git credential-osxkeychain get host=the.host.com. This returns a string with format password=the_token\nusername=the_user which can be parsed to retrieve the need information for making authenticated api calls. I honestly have never written a single line of go, but if someone would point me to the right file (where the auth-info is read in) I might be able to create a draft PR.
Possibly related to #596 (closed)