not valid: is this a git repository?

Farrukh Chishti picture Farrukh Chishti · Apr 28, 2015 · Viewed 36k times · Source

My question is NOT this question.
On performing a git clone I am getting this error. Command than I am using is:

$ git clone "https://gdt.test.com/gitblit/log/?r=mytest.git&h=refs/heads/branch_development"

On simply running:

$ git clone "https://gdt.test.com/gitblit/log/?r=mytest.git"

I get the error:

fatal: could not create work tree dir '?r=mytest'.: Invalid argument

I think I need to put the full URL along with r and h parameters. Because these parameters specify the name of my repository.

I was doing a mistake (copying and pasting the URL). However, even on using the URL:

gdt.test.com/gitblit/r/mytest.git/

I am getting error:

'fatal: repository 'gdt.test.com/gitblit/r/mytest.git/'; not found. 

How to copy correct URL from gitblit summary page?

Answer

James Moger picture James Moger · Apr 28, 2015

Problem: you are copying & pasting the log webpage URL and expecting to be able to clone a repository from the generated html.

The proposed successful answer has sufficiently scrubbed the URL which hides the solution from you: you are missing the repository serving path in the URL, /r/ or /git/.

Using your URL example, the correct syntax should be:

git clone https://gdt.test.com/gitblit/r/mytest.git

The Summary page provides generated URLs with copy & paste functions to avoid these type of errors.

enter image description here