Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GHE + private repo: Receiving EOF exception for status and comment #196

Closed
rngtng opened this issue Jul 24, 2018 · 7 comments · Fixed by #197
Closed

GHE + private repo: Receiving EOF exception for status and comment #196

rngtng opened this issue Jul 24, 2018 · 7 comments · Fixed by #197

Comments

@rngtng
Copy link
Contributor

rngtng commented Jul 24, 2018

I want to setup atlantis for a private repo on a GitHub Enterprise instance. I managed to run atlantis server 0.4.3 using the docker image and configured as described. The server receives the webhooks successfully and is able to clone the repo. BUT, it somehow is not able to report back on the PR via status or comments. The error message just says EOF like:

2018/07/24 11:45:17 middleware.go:40: [INFO] server: 200 | POST /events
2018/07/24 11:45:17 command_runner.go:88: [WARN] org/repo#72: Unable to update commit status: Post https://github.onpremise.de/api/v3/repos/org/repo/statuses/34b200b5bf6be8bfdedd342c214a0ffeece89750: EOF

Andy clue what this could be??? Thanks!

@lkysow
Copy link
Member

lkysow commented Jul 24, 2018

Hmm, what if you make the call directly?

curl -u username:token --data '{"state":"success", "description":"description", "context":"context"}' -H "Content-Type: application/json"  https://github.onpremise.de/api/v3/repos/org/repo/statuses/34b200b5bf6be8bfdedd342c214a0ffeece89750

@rngtng
Copy link
Contributor Author

rngtng commented Jul 24, 2018

this works. I tried it for comments:

curl -u $ATLANTIS_GH_USER:$ATLANTIS_GH_TOKEN --data '{"body":"blabla"}' -H "Content-Type: application/json"  https://$ATLANTIS_GH_HOSTNAME/api/v3/repos/org/repo/issues/72/comments

@lkysow
Copy link
Member

lkysow commented Jul 24, 2018

Okay and are you running that from inside the Atlantis docker container?

@rngtng
Copy link
Contributor Author

rngtng commented Jul 24, 2018

yes...

@rngtng
Copy link
Contributor Author

rngtng commented Jul 24, 2018

I see server reacting on comments, cloneing the repo but fails when using the gh api for comments or statuses, always EOF. I checked gh client repo for EOF issues, but couldn't spot anything helpful: https://github.com/google/go-github/issues?utf8=%E2%9C%93&q=EOF

@lkysow
Copy link
Member

lkysow commented Jul 24, 2018

Mind coming on our slack channel and I can help you debug further? https://thawing-headland-22460.herokuapp.com/

@rngtng
Copy link
Contributor Author

rngtng commented Jul 24, 2018

@lkysow figured out it's related to my extra /etc/hosts entry for ghe which is not respected by the go gh client by default. Solution is described here: golang/go#22846 (comment)

Run echo "hosts: files dns" > /etc/nsswitch.conf to fix it.

meringu pushed a commit to meringu/atlantis that referenced this issue May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants