mesosphere-backup / etcd-mesos

self-healing etcd on mesos!
Apache License 2.0
68 stars 19 forks source link

Building inside a Docker Container failing #105

Closed JohnOmernik closed 7 years ago

JohnOmernik commented 7 years ago

Hey all, I am trying to build etcd-mesos inside of a docker container. Go is working, git is installed etc.
When I build, I get to a point where go fails because it it says auth denied at github which makes no sense to me, if it's just pulling why does it need auth? Now, I realize there are NO keys/users setup in github... inside the container, but I am not a git expert... thoughts?

go build -o bin/etcd-mesos-executor cmd/etcd-mesos-executor/app.go go build -o bin/etcd-mesos-scheduler cmd/etcd-mesos-scheduler/app.go go build -o bin/etcd-mesos-proxy cmd/etcd-mesos-proxy/app.go git submodule init Submodule '_vendor/coreos/etcd' (git@github.com:coreos/etcd.git) registered for path '_vendor/coreos/etcd' git submodule update Cloning into '_vendor/coreos/etcd'... Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts. Permission denied (publickey). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists. fatal: clone of 'git@github.com:coreos/etcd.git' into submodule path '_vendor/coreos/etcd' failed Makefile:36: recipe for target 'bin/etcd' failed make: *\ [bin/etcd] Error 128

JohnOmernik commented 7 years ago

So this is due to the .git/config and .gitmodules file indicating the URL for the coreos submodule is ssh. I would say we should consider making this https by default (so "anonymous" pulling of the module is easier) but I am not a git expert, but at least I found my issue, and can add it here for others who may want to use it.

The fix cd etcd-mesos

sed -i "s_git@https://" .gitmodules sed -i "s_git@https://" .git/config

sed -i "s_com:coreoscom/coreos" .gitmodules sed -i "s_com:coreoscom/coreos" .git/config

Then it built fine

pires commented 7 years ago

Closing in favor of #107. Please, comment there @JohnOmernik!