Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
flux2
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
fluxcd
flux2
Commits
fffe40fb
Unverified
Commit
fffe40fb
authored
4 years ago
by
Stefan Prodan
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #1222 from fluxcd/fix-git-http
Fix create source git auth for non-HTTPS repos
parents
466fdae7
74feda73
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmd/flux/create_source_git.go
+4
-0
4 additions, 0 deletions
cmd/flux/create_source_git.go
cmd/flux/log.go
+4
-0
4 additions, 0 deletions
cmd/flux/log.go
pkg/log/log.go
+2
-0
2 additions, 0 deletions
pkg/log/log.go
with
10 additions
and
0 deletions
cmd/flux/create_source_git.go
+
4
−
0
View file @
fffe40fb
...
...
@@ -240,6 +240,10 @@ func createSourceGitCmdRun(cmd *cobra.Command, args []string) error {
secretOpts
.
Username
=
sourceGitArgs
.
username
secretOpts
.
Password
=
sourceGitArgs
.
password
secretOpts
.
CAFilePath
=
sourceGitArgs
.
caFile
case
"http"
:
logger
.
Warningf
(
"insecure configuration: credentials configured for an HTTP URL"
)
secretOpts
.
Username
=
sourceGitArgs
.
username
secretOpts
.
Password
=
sourceGitArgs
.
password
}
secret
,
err
:=
sourcesecret
.
Generate
(
secretOpts
)
if
err
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
cmd/flux/log.go
+
4
−
0
View file @
fffe40fb
...
...
@@ -41,6 +41,10 @@ func (l stderrLogger) Successf(format string, a ...interface{}) {
fmt
.
Fprintln
(
l
.
stderr
,
`✔`
,
fmt
.
Sprintf
(
format
,
a
...
))
}
func
(
l
stderrLogger
)
Warningf
(
format
string
,
a
...
interface
{})
{
fmt
.
Fprintln
(
l
.
stderr
,
`⚠️`
,
fmt
.
Sprintf
(
format
,
a
...
))
}
func
(
l
stderrLogger
)
Failuref
(
format
string
,
a
...
interface
{})
{
fmt
.
Fprintln
(
l
.
stderr
,
`✗`
,
fmt
.
Sprintf
(
format
,
a
...
))
}
This diff is collapsed.
Click to expand it.
pkg/log/log.go
+
2
−
0
View file @
fffe40fb
...
...
@@ -24,6 +24,8 @@ type Logger interface {
Waitingf
(
format
string
,
a
...
interface
{})
// Successf logs a formatted success message.
Successf
(
format
string
,
a
...
interface
{})
// Warningf logs a formatted warning message.
Warningf
(
format
string
,
a
...
interface
{})
// Failuref logs a formatted failure message.
Failuref
(
format
string
,
a
...
interface
{})
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment