MCPcopy Create free account
hub / github.com/entireio/git-sync / addSourceAuth

Function addSourceAuth

cmd/git-sync/flags.go:27–34  ·  view source on GitHub ↗
(cmd *cobra.Command, auth *gitsync.EndpointAuth)

Source from the content-addressed store, hash-verified

25}
26
27func addSourceAuth(cmd *cobra.Command, auth *gitsync.EndpointAuth) {
28 cmd.Flags().StringVar(&auth.Token, "source-token", envOr("GITSYNC_SOURCE_TOKEN", ""), "source token/password")
29 cmd.Flags().StringVar(&auth.Username, "source-username", envOr("GITSYNC_SOURCE_USERNAME", "git"), "source basic auth username")
30 cmd.Flags().StringVar(&auth.BearerToken, "source-bearer-token", envOr("GITSYNC_SOURCE_BEARER_TOKEN", ""), "source bearer token")
31 cmd.Flags().BoolVar(&auth.SkipTLSVerify, "source-insecure-skip-tls-verify",
32 envBool("GITSYNC_SOURCE_INSECURE_SKIP_TLS_VERIFY"),
33 "skip TLS certificate verification for the source")
34}
35
36func addTargetAuth(cmd *cobra.Command, auth *gitsync.EndpointAuth) {
37 cmd.Flags().StringVar(&auth.Token, "target-token", envOr("GITSYNC_TARGET_TOKEN", ""), "target token/password")

Callers 4

newSyncLikeCmdFunction · 0.85
newProbeCmdFunction · 0.85
newFetchCmdFunction · 0.85
newBootstrapCmdFunction · 0.85

Calls 2

envOrFunction · 0.85
envBoolFunction · 0.85

Tested by

no test coverage detected