netlify / netlifyctl

MIT License
176 stars 34 forks source link

"unknown field 'Repo'" when installing #136

Open hirish opened 6 years ago

hirish commented 6 years ago

When installing from scratch:

brew install go
go get github.com/netlify/netlifyctl

I'm getting an install error:

# github.com/netlify/netlifyctl/commands/init
../go/src/github.com/netlify/netlifyctl/commands/init/init.go:100:8: unknown field 'Repo' in struct literal of type models.SiteSetup

I'm running go1.10.3.

We encountered this on CI of a repo which updates pretty infrequently, so not exactly sure when it was introduced - some time in the last month.

Any idea what the issue could be? This is currently preventing us deploying updates to our netlify site.

fool commented 6 years ago

While this should be investigated, for now, can you use the provided released binary?

https://github.com/netlify/netlifyctl/releases

If you need a different architecture, we can probably build it for you...

lukerollans commented 6 years ago

I'm seeing this, too

Building app
Step 1/14 : FROM golang:1.10.0-alpine3.7 as netlify
 ---> 85256d3905e2
Step 2/14 : RUN apk --no-cache --update add git
 ---> Using cache
 ---> ac94bc543a4e
Step 3/14 : RUN go get github.com/netlify/netlifyctl
 ---> Running in 097a12bcc5b6
# github.com/netlify/netlifyctl/commands/init
src/github.com/netlify/netlifyctl/commands/init/init.go:100:8: unknown field 'Repo' in struct literal of type models.SiteSetup
ERROR: Service 'app' failed to build: The command '/bin/sh -c go get github.com/netlify/netlifyctl' returned a non-zero code: 2

Grabbing a prebuilt binary would work for sure, but it's also pretty convenient to do the above and has indeed worked in the past

bcomnes commented 6 years ago

This is possibly an issue introduced by updates in https://github.com/netlify/open-api