Repository#clone_at: unexpected behavior with URL without `.git` ending
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2.3k
- Forks
- 293
- PR merge metrics
- No merged PRs in 30d
Description
This problem occurs when authentication parameters are specified in a repository URL.
> url = "https://test:token@github.com/company/project.git"
> url_without_git_ending = "https://test:token@github.com/company/project"
>
> Rugged::Repository.clone_at(url_without_git_ending", "/folder", credentials: nil)
Rugged::NetworkError: authentication required but no callback set
from (irb):11:in `clone_at'
from (irb):11
from /usr/bin/irb:11:in `<main>'
> Rugged::Repository.clone_at(url, "/folder", credentials: nil)
=> #<Rugged::Repository:14348060 {path: "/folder"}>
git clone doesn't depend on .git ending.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the two URLs using Rugged::Repository.clone_at and compare authentication handling when the .git suffix is absent. Trace the clone_at entry point to find why credentials are not passed through, then verify that a URL without .git clones successfully with authentication parameters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, ruby
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100