MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / promptProjectGitCredentials

Function promptProjectGitCredentials

pkg/cmd/project/convert/convert.go:336–361  ·  view source on GitHub ↗
(opts *ConvertOptions)

Source from the content-addressed store, hash-verified

334}
335
336func promptProjectGitCredentials(opts *ConvertOptions) error {
337 if opts.GitUsername.Value == "" {
338 if err := opts.Ask(&survey.Input{
339 Message: "Git username",
340 Help: "The Git username.",
341 }, &opts.GitUsername.Value, survey.WithValidator(survey.ComposeValidators(
342 survey.MaxLength(200),
343 survey.Required,
344 ))); err != nil {
345 return err
346 }
347 }
348
349 if opts.GitPassword.Value == "" {
350 if err := opts.Ask(&survey.Password{
351 Message: "Git password",
352 Help: "The Git password.",
353 }, &opts.GitPassword.Value, survey.WithValidator(survey.ComposeValidators(
354 survey.MaxLength(200),
355 survey.Required,
356 ))); err != nil {
357 return err
358 }
359 }
360 return nil
361}
362
363func promptLibraryGitCredentials(opts *ConvertOptions, gitCredentialsCallback GetAllGitCredentialsCallback) error {
364 if opts.GitCredentials.Value == "" {

Callers 1

PromptForConfigAsCodeFunction · 0.85

Calls 1

AskMethod · 0.65

Tested by

no test coverage detected