diff options
Diffstat (limited to 'repository.go')
-rw-r--r-- | repository.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/repository.go b/repository.go index 79c4d0a..e2a18c4 100644 --- a/repository.go +++ b/repository.go @@ -408,7 +408,7 @@ func (r *Repository) clone(ctx context.Context, o *CloneOptions) error { c := &config.RemoteConfig{ Name: o.RemoteName, - URL: o.URL, + URLs: []string{o.URL}, } if _, err := r.CreateRemote(c); err != nil { @@ -436,7 +436,10 @@ func (r *Repository) clone(ctx context.Context, o *CloneOptions) error { } if o.RecurseSubmodules != NoRecurseSubmodules { - if err := w.updateSubmodules(o.RecurseSubmodules); err != nil { + if err := w.updateSubmodules(&SubmoduleUpdateOptions{ + RecurseSubmodules: o.RecurseSubmodules, + Auth: o.Auth, + }); err != nil { return err } } |