rugged icon indicating copy to clipboard operation
rugged copied to clipboard

Repository#clone_at: unexpected behavior with URL without `.git` ending

Open alexey-igrychev opened this issue 7 years ago • 0 comments

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.

alexey-igrychev avatar Aug 20 '18 13:08 alexey-igrychev