Can't clone /owner/repo.git style url by git-2.12.2
See original GitHub issueBefore submitting an issue to Gitbucket I have first:
- read the contribution guidelines
- searched for similar already existing issue
- read the documentation and wiki
Issue
Impacted version: current master I checked maybe 4.11 too?
Deployment mode: standalone app with listen 80 port.
Problem description:
- git clone http://localhost/owner/repo.git can’t work with current version of git.
C:\Users\kounoike\Documents\gitbucket\t>git --version
git version 2.12.2.windows.2
C:\Users\kounoike\Documents\gitbucket\t>git clone http://localhost/root/JenkinsTest.git
Cloning into 'JenkinsTest'...
fatal: unable to update url base from redirection:
asked for: http://localhost/root/JenkinsTest.git/info/refs?service=git-upload-pack
redirect: http://localhost/git/root/JenkinsTest.git/info/refs
maybe, redirect isn’t accepted by current version of git cli? It is serious problem for GitBucket-Jenkins integration.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Troubleshooting cloning errors - GitHub Docs
If you're having trouble cloning a repository, check these common errors.
Read more >Can't clone a github repo on Linux via HTTPS - Stack Overflow
The answer was simple but not obvious: Instead of: git clone https://github.com/org/project.git. do: git clone https://username@github.com/org/project.git.
Read more >Repository in git2 - Rust - Docs.rs
An owned git repository, representing all state associated with the underlying filesystem. This structure corresponds to a git_repository in libgit2.
Read more >Changelog - NodeGit
Support signing commits in Repository.prototype.mergeBranches . The last parameter processMergeMessageCallback is now deprecated, but will continue to work.
Read more >Git Notes for Professionals - Falksangdata
the property of their respective owners ... Section 3.12: Set the URL for a Specific Remote ... Section 9.1: Cloning a Git repository...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I found root cause. By https://github.com/git/git/blob/6628eb41db5189c0cdfdced6d8697e7c813c5f0f/http.c#L1513-L1517 , git checks original URL and redirected URL by
tail
. In current GitBucket(4.15.0), redirect response drops query string.I add query string, it works correctly. I will send PR.
I hit this same issue today trying to build out a docker stack. I can’t get the app to build locally, or I’d submit a pull request - basically, I think a route regex for
/org/user/reponame.git
that passes it to the same endpoint as /git/. If I can get a local build working, I’ll submit a PR.