Codiad-CodeGit icon indicating copy to clipboard operation
Codiad-CodeGit copied to clipboard

Cannot pull/push

Open wernight opened this issue 8 years ago • 8 comments

Trying to do a pull/push returns:

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

Environment:

  • Using wernight/codiad Docker image

  • Running inside the Terminal plugin (or directly inside the shell as PHP's user):

    $ ssh -T [email protected]
    Welcome to GitLab, John Doe!
    
  • Running from inside the Terminal plugin a git pull also works.

  • This plugins remote info look good.

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 avatar Jun 28 '16 22:06 wernight

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

wernight avatar Jun 29 '16 13:06 wernight

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

Andr3as avatar Jul 03 '16 20:07 Andr3as

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

$ docker run --rm -p 8080:80 wernight/codiad:alpine

wernight avatar Jul 04 '16 15:07 wernight

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

Andr3as avatar Jan 16 '17 20:01 Andr3as

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).

wernight avatar Jan 17 '17 10:01 wernight

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 [email protected]
  ssh: Could not resolve hostname github.com: Try again

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

Andr3as avatar Jan 17 '17 15:01 Andr3as

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 [email protected] 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 [email protected] 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 .

wernight avatar Jan 17 '17 19:01 wernight

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?

Andr3as avatar Jan 18 '17 20:01 Andr3as