Is there a unit test? I'm using the latest golang 1.4.2 with gitlab 7.9.4 
b10de29 and it does not work with the various command lines i've tried. 

Perhaps i'm using the wrong syntax.

go get 1.2.3.4/developer-group/project.git
... wait ...
# cd .; git clone 1.2.3.4/developer-group/project <dest dir>
fatal: repository '1.2.3.4/developer-group/project' does not exist


Golang is dropping the '.git' extension. If i run:

git clone http://1.2.3.4/developer-group/project
fatal: repository '1.2.3.4/developer-group/project' not found


it fails, but adding '.git' gets me to an authentication prompt:

git clone http://1.2.3.4/developer-group/project.git
Cloning into 'project'...
Username for 'http://1.2.3.4':
...


So gitlab apparently doesn't assume a '.git' extension. I suspect github 
does. I don't know enough to say whether it's good or bad, but it seems 
like it might be ok to do this. Also discussed a while ago 
http://stackoverflow.com/questions/27500861/whats-the-properly-way-to-go-get-a-private-repository
 
with the typical intrusion of github into the answers.

The next issue i can see, which may be resolved and unit tested as part of 
the fix for 8949, is that gitlab is prompting for username/password because 
the 'http' syntax is used. Not good. 

If i use the gitlab 'ssh' syntax there is no prompt because i have ssh keys 
setup.

git clone git@1.2.3.4:developer-group/project.git
Cloning into project...


Trying to use this syntax for golang seems to be a problem:

go get git@1.2.3.4:developer-group/project.git
package git@1.2.3.4:developer-group/project.git: unrecognized import path 
"git@1.2.3.4:developer-group/project.git"

go get git@1.2.3.4:developer-group/project
package git@1.2.3.4:developer-group/project: unrecognized import path 
"git@1.2.3.4:developer-group/project"


There was a workaround mentioned for github 
at https://gist.github.com/shurcooL/6927554:

go get -u -f 1.2.3.4/developer-group/project


The syntax currently isn't usable in my tests. Maybe it works but i 
wouldn't make that assumption. All of these issues are known.
https://github.com/gitlabhq/gitlabhq/issues/5769
http://grokbase.com/p/gg/golang-nuts/13cywxszce/go-nuts-gitlab-support-for-go-get

I think this is the process golang uses to resolve the 'get' request. There 
could be a better/later source. They will try to use an https URL first but 
they don't appear to support the gitlab ssh syntax.
https://code.google.com/p/go/source/detail?r=0af5bcfdb4c1

I'm not sure of the context, 
but https://github.com/gitlabhq/gitlabhq/issues/8949 directly addresses 
this issue and it does not appear to be fixed in my environment. 

This mechanism for retrieving code/binaries/... is simple/nice. A standard 
way to resolve it might well find its way into other development 
environments.

>

-- 
You received this message because you are subscribed to the Google Groups 
"GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to gitlabhq+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/gitlabhq/8284801e-486c-4467-98e2-f44a03cb7b06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to