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

git-receive-pack error #17

Open
ceremcem opened this issue Jun 11, 2019 · 7 comments
Open

git-receive-pack error #17

ceremcem opened this issue Jun 11, 2019 · 7 comments
Labels

Comments

@ceremcem
Copy link

I have a dedicated git repo backed by GOGS, which is served behind Nginx proxy and has an url like https://example.com/git, so the repo bar under user foo is named as https://example.com/git/foo/bar.

My git-cache-http-server setup works correctly for Github but not for my dedicated server. What is git-receive-pack error? How can I workaround this?

The error I've got from the failing git repo is like so:

fatal: unable to access 'http://gitcache:8080/example/git/foo/bar.git/': The requested URL returned error: 500

Systemctl status is as follows:

$ sudo systemctl status git-cache-http-server
● git-cache-http-server.service - Caching git http server
   Loaded: loaded (/etc/systemd/system/git-cache-http-server.service; disabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-06-12 02:36:16 +03; 12min ago
 Main PID: 21734 (node)
    Tasks: 6 (limit: 4915)
   Memory: 15.4M
   CGroup: /system.slice/git-cache-http-server.service
           └─21734 node /usr/local/bin/git-cache-http-server

Jun 12 02:36:19 cca-erik env[21734]: Called from module at parserOnIncoming (_http_server.js:601:12)
Jun 12 02:36:19 cca-erik env[21734]: Called from module at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)
Jun 12 02:36:21 cca-erik env[21734]: GET /example.com/git/foo/bar.git/info/refs?service=git-receive-pack
Jun 12 02:36:21 cca-erik env[21734]: ERROR: Service git-receive-pack not supported yet
Jun 12 02:36:21 cca-erik env[21734]: Called from module Error: Service git-receive-pack not supported yet
Jun 12 02:36:21 cca-erik env[21734]: Called from module at Server.Main.handleRequest (/usr/local/lib/node_modules/git-cache-http-server/bin/git-cache-http-server.js:125:
Jun 12 02:36:21 cca-erik env[21734]: Called from module at emitTwo (events.js:125:13)
Jun 12 02:36:21 cca-erik env[21734]: Called from module at Server.emit (events.js:213:7)
Jun 12 02:36:21 cca-erik env[21734]: Called from module at parserOnIncoming (_http_server.js:601:12)
Jun 12 02:36:21 cca-erik env[21734]: Called from module at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)
@jonasmalacofilho
Copy link
Owner

I'm not sure what's going on, other than the client (I think) is trying to use one variant of the protocol we don't yet support. From a quick read of the current protocol docs, I can't immediately see why it's trying to use git-receive-pack on one server, but not on the other.

I think I'll need to reproduce the issue locally to understand it. I'll try to do this in the next few days.

@ceremcem
Copy link
Author

Is it a possibility that GOGS does use git-receive-pack forcefully? So might it be a GOGS related setting?

@jonasmalacofilho
Copy link
Owner

@ceremcem I'm sorry that I still haven't looked into this.

Can you give me access to a copy of the repository where this happens?

@ceremcem
Copy link
Author

ceremcem commented Oct 1, 2019

I've e-mailed the login credentials just now. I experienced that problem with any repository in my server, so any trivial repo should give the same error.

@jonasmalacofilho
Copy link
Owner

I was able to reproduce the git-receive-pack calls (even though I wasn't yet testing the cache) on both your Gogs instance and GitHub. So it's easier to just add support for it...

Can you by any chance look into that?


(I'm still curious as to why the problem didn't happen before with GitHub, but I don't think there's much point investigating into it now)

@ceremcem
Copy link
Author

Any updates?

@jonasmalacofilho
Copy link
Owner

I checked the protocol specification (and its implementation in git) and the git-receive-pack service should only be requested for a push.

The current version of the project only supports clone and fetch. I started to port the project to Rust, and was going to add support for push/git-receive-pack in the new version, but other things happened and it's still far from ready...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants