Skip to content

Commit

Permalink
fix: argo-cd git submodule is using SSH auth instead of HTTPs (argopr…
Browse files Browse the repository at this point in the history
…oj#3118)

Signed-off-by: shunki-fujita <[email protected]>
  • Loading branch information
shunki-fujita committed Jun 29, 2022
1 parent b524769 commit 3441543
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion util/git/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,10 @@ func (m *nativeGitClient) Checkout(revision string, submoduleEnabled bool) error
}
if _, err := os.Stat(m.root + "/.gitmodules"); !os.IsNotExist(err) {
if submoduleEnabled {
if err := m.runCredentialedCmd("git", "submodule", "update", "--init", "--recursive"); err != nil {
if err := m.runCredentialedCmd("git", "submodule", "sync", "--recursive"); err != nil {
return err
}
if err = m.runCredentialedCmd("git", "submodule", "update", "--init", "--recursive"); err != nil {
return err
}
}
Expand Down

0 comments on commit 3441543

Please sign in to comment.