Created
June 29, 2016 05:25
-
-
Save calavera/59d47c359c77b6a8f766cab58e1072ba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/docker/docker-credential-helpers/credentials" | |
"github.com/docker/docker-credential-helpers/secretservice" | |
) | |
var nativeStore = secretservice.SecretService{} | |
func main() { | |
c := &credentials.Credentials{ | |
ServerURL: "https://api.github.com", | |
Username: "token", | |
Secret: "my-super-secret-token", | |
} | |
nativeStore.Add(c) | |
secret, username, err := nativeStore.Get("https://api.github.com") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment