How to authenticate a private Go Module using go 1.11 and Google App Engine Standard

后端 未结 3 665
轻奢々
轻奢々 2021-01-03 03:17

I\'ve been updating my entire go gae standard project to use go 1.11\'s modules.

Main directory structure

app.yaml
app.go
go.mod
go         


        
3条回答
  •  我在风中等你
    2021-01-03 03:51

    Set git credentials before deploying:

    git config credential.helper '!f() { sleep 1; echo "username=${GIT_USER}\npassword=${GIT_PASSWORD}"; }; f'
    
    export GIT_USER=put_git_user_here
    export GIT_PASSWORD=put_git_password_here
    
    gcloud app deploy
    

提交回复
热议问题