Andr3as / Codiad-CodeGit

Git integration for Codiad
MIT License
26 stars 15 forks source link

Cannot pull/push #36

Open wernight opened 8 years ago

wernight commented 8 years ago

Trying to do a pull/push returns:

{"status":"error","message":"Failed to pull repo!"}

Environment:

PHP's logs seem pretty parse about the cause of this issue. I only see:

2016/06/28 22:22:22 [error] 13#0: *469 connect() failed (111: Connection refused) while connecting to upstream, client: ::ffff:10.234.0.2, server: _, request: "GET /plugins/Codiad-CodeGit-master/controller.php?action=status&path=myproject HTTP/1.1", upstream: "fastcgi://[::1]:9000", host: "codiad.example.com", referrer: "http://codiad.example.com/"

wernight commented 8 years ago

It's visibly due to the reliance on some binaries as this issue is only on Alpine Linux and not on Debian based.

Andr3as commented 8 years ago

I'm currently not able to test it with Alpine Linux. Did you checked the dependencies?

wernight commented 8 years ago

Yes dependencies are met. The simplest to repro this bug is using Docker:

$ docker run --rm -p 8080:80 wernight/codiad:alpine
Andr3as commented 7 years ago

Sorry for my late reply. I tested it today with your docker image and was not able to reproduce your issue.

wernight commented 7 years ago

You're sure you're using the :alpine tag? I don't remember upgrading it, so it should still reproduce (that is not pull or push without actually giving an error if I recall).

Andr3as commented 7 years ago

Okay, thanks, I missed that.

After some digging: Alpine does not provide Bash as shell. Try to change the following in expect.sh #!/bin/bash to #!/bin/sh

I was not able to test it. My alpine docker instance tells me always the following error

   $ ssh -T git@github.com
   ssh: Could not resolve hostname github.com: Try again

After fixing this, I'll come back to you.

wernight commented 7 years ago

It sounds like you cannot access network from within your container. That shouldn't be specific to Alpine.

To install bash just do: apk add --update bash

Le mar. 17 janv. 2017 à 16:18, Andr3as notifications@github.com a écrit :

Okay, thanks, I missed that.

After some digging: Alpine does not provide Bash as shell. Try to change the following in expect.sh https://github.com/Andr3as/Codiad-CodeGit/blob/master/scripts/expect.sh

!/bin/bash

to

!/bin/sh

I was not able to test it. My alpine docker instance tells me always the following error

$ ssh -T git@github.com ssh: Could not resolve hostname github.com: Try again

After fixing this, I'll come back to you.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Andr3as/Codiad-CodeGit/issues/36#issuecomment-273198178, or mute the thread https://github.com/notifications/unsubscribe-auth/AAI5A88R0qjznrF-K4ksEqycjW5_ecHyks5rTNvSgaJpZM4JAmlu .

Andr3as commented 7 years ago

At home my container works as it should 🙈.

Now I was able to test the solution from above. I worked for me both on Alpine and on Debian. Could you please verify it on your system?