@@ -8,6 +8,16 @@ import (
8
8
hm "crypto/hmac"
9
9
"crypto/sha256"
10
10
"fmt"
11
+ "io/ioutil"
12
+ "net/url"
13
+ "os"
14
+ "path/filepath"
15
+ "regexp"
16
+ "strings"
17
+ "sync"
18
+ "testing"
19
+ "time"
20
+
11
21
"github.com/aws/aws-sdk-go/aws"
12
22
"github.com/aws/aws-sdk-go/aws/session"
13
23
"github.com/aws/aws-sdk-go/service/codecommit"
@@ -21,15 +31,6 @@ import (
21
31
"gopkg.in/src-d/go-git.v4/plumbing/object"
22
32
"gopkg.in/src-d/go-git.v4/plumbing/transport/http"
23
33
"gopkg.in/yaml.v2"
24
- "io/ioutil"
25
- "net/url"
26
- "os"
27
- "path/filepath"
28
- "regexp"
29
- "strings"
30
- "sync"
31
- "testing"
32
- "time"
33
34
)
34
35
35
36
var contexts []* common.Context
@@ -354,7 +355,9 @@ func setupRepo(sess *session.Session, name string, dir string) error {
354
355
// git push
355
356
remote , err := repo .CreateRemote (& config.RemoteConfig {
356
357
Name : "origin" ,
357
- URL : common .StringValue (resp .RepositoryMetadata .CloneUrlHttp ),
358
+ URLs : []string {
359
+ common .StringValue (resp .RepositoryMetadata .CloneUrlHttp ),
360
+ },
358
361
})
359
362
if err != nil {
360
363
fmt .Printf ("Failure create remote '%s'\n " , name )
@@ -363,7 +366,10 @@ func setupRepo(sess *session.Session, name string, dir string) error {
363
366
364
367
username , password := credentialHelper (sess , common .StringValue (resp .RepositoryMetadata .CloneUrlHttp ))
365
368
366
- auth := http .NewBasicAuth (username , password )
369
+ auth := & http.BasicAuth {
370
+ Username : username ,
371
+ Password : password ,
372
+ }
367
373
err = remote .Push (& git.PushOptions {
368
374
RemoteName : "origin" ,
369
375
Auth : auth ,
0 commit comments