rugged
rugged copied to clipboard
Repository#clone_at: unexpected behavior with URL without `.git` ending
This problem occurs when authentication parameters are specified in a repository URL.
> url = "https://test:[email protected]/company/project.git"
> url_without_git_ending = "https://test:[email protected]/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.