Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I push to a Smart Mirror through Eclipse using HTTPS?

Eric Park June 6, 2018

I am attempting to setup a Smart Mirror instance, and while everything appears to be correct. I cannot push to the mirror using Eclipse and HTTPS.

SSH works through Eclipse, and it is possible to push through HTTPS using command line git.

Since I am setting this up in an Enterprise environment, and all of our users use HTTPS this is a problem for me. Setting everyone up with SSH keys is simply not an option.

 

When trying to use HTTPS in Eclipse, I receive the following error:

Can't connect to any repository: https://user.name@mirrorhost/scm/test-git/project/repo.git (https://user.name@mirrorhost/scm/test-git/project/repo.git: This repository is a read-only mirror
Changes cannot be pushed as this is read-only mirror of repository
PROJECT/repo. Pushes can only be made to the original repository. This
is achieved by running this command in your local repository directory:

git remote set-url --push origin <original-repository-clone-url>

This ensures subsequent pushes are sent to the original repository.)

 

I am curious if I am somehow doing something wrong, or if EGit is simply not working with the mirrors. Unfortunately, EGit does not provide any logging, and it is hard to tell what it is actually doing. Is anyone successfully using Eclipse to push through a Bitbucket mirror over HTTPS? Any suggestions for making this work?

 

1 answer

0 votes
Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 10, 2018

Hi Eric,

Which version of Bitbucket Server are you using on the primary and the mirror server?

Cheers,

Christian

Premier Support Engineer

Atlassian

Eric Park June 11, 2018

Hi Christian,

To start with both were the same version but currently:

Primary is 5.11.1

Mirror is 5.10.0

Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 11, 2018

Hi Eric,

Those versions support pushing to the mirror, so it's a bit surprising you'd be getting this error.

From your description I understood the following:

External git via HTTPs: Works

git via Eclipse via SSH: Works

git via Eclipse via HTTPs: Doesn't work

 

Is that correct? If so, it would suggest that perhaps the embedded git in Eclipse is doing something wonky that's causing this to happen.

 

Cheers,

Christian

Premier Support Engineer

Atlassian

Eric Park June 11, 2018

That is correct, and this is my best guess too.

Unfortunately, the embedded git in eclipse doesn't provide much logging so it's hard to tell exactly what is happening. I have tried my hand at some google-fu but have been unable to find examples of something similar happening to others.

At this point I'm a bit stuck. Pushing over HTTPS works fine with the primary server, but not with the mirror.

I do not see anything in the bitbucket logs except in the access.log

10.16.1.56 | https | i@1HSALOVx929x1833x0 | - | 2018-06-11 15:29:07,574 | "GET /scm/test-git/project/repo.git/info/refs HTTP/1.1" | "" "JGit/4.6.1.201703071140-r" | - | - | - | - | - | - |
10.16.1.56 | https | o@1HSALOVx929x1833x0 | - | 2018-06-11 15:29:07,581 | "GET /scm/test-git/project/repo.git/info/refs HTTP/1.1" | "" "JGit/4.6.1.201703071140-r" | 401 | 0 | 0 | - | 7 | - |
10.16.1.56 | https | i@1HSALOVx929x1834x0 | - | 2018-06-11 15:29:07,641 | "GET /scm/test-git/project/repo.git/info/refs HTTP/1.1" | "" "JGit/4.6.1.201703071140-r" | - | - | - | - | - | - |
10.16.1.56 | https | o@1HSALOVx929x1834x0 | user.name | 2018-06-11 15:29:07,663 | "GET /scm/test-git/project/repo.git/info/refs HTTP/1.1" | "" "JGit/4.6.1.201703071140-r" | 200 | 0 | 435 | - | 22 | - |

Seems to give a 401 at some point. Not too much detail to go on though.

Deleted user November 21, 2018

We have the same problem on Eclipse 4.8 and eclipse egit plugin 5.0.0

Is anybody aware of a solution yet?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events