It appears that our internally hosted Bitbucket host is serving up incorrect meta-tags for the "go get" command in Google go.
curl -i http://david.x.johnson@myhost.com/scm/pid/catena?go-get=1 HTTP/1.1 200 OK Server: Apache-Coyote/1.1 X-AREQUESTID: @9UI3HTx1348x608596x0 X-ASEN: SEN-3351873 Transfer-Encoding: chunked Date: Thu, 07 Jul 2016 03:28:07 GMT <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="go-import" content="myhost.com/scm/pid git http://myhost.com/scm/scm/pid.git"> </head> <body> </body> </html>
What I'm expecting back for the meta-tag name go-import is something like the following:
<meta name="go-import" content="myhost.com/scm/pid/catena git http://myhost.com/scm/pid/catina.git">
Community moderators have prevented the ability to post new answers.
Hi David,
When using the go get
command with Bitbucket Server, the correct syntax is
go get {hostname}/{project_key}/{repo_slug}
which will lead to go get
making a request to
http://{hostname}/{project_key}/{repo_slug}?go-get=1
and scanning the response for a go-import
like the following.
<meta name="go-import" content="{hostname}/{project_key}/{repo_slug} git https://{hostname}/scm/{project_key}/{repo_slug}.git">
Note that this syntax is similar to the clone URL, but without the /scm
part. In your case, the following request should work.
go get myhost.com/pid/catena
Please refer to https://jira.atlassian.com/browse/BSERV-5380 for further information on go get
with Bitbucket Server.
Best regards,
Stefan Petrucev
Atlassian Bitbucket
You could also solve ssh access with ssh config ether in /etc/ssh/ssh_config or ~/.ssh/config
Host bitbucket.your.url
Port 7999
User git
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And if you're using an internally-hosted BitBucket that requires SSH cloning on a specific port, you can tell Git to always use SSH like so:
git config --global url."ssh://git@source.example.com:7999/".insteadOf \
"https://source.example.com/scm/"
So whenever Git sees a URL starting with {{https://source.example.com/scm/}}, it will replace it with {{ssh://git@source.example.com:7999/}}.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.