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?
Hi Eric,
Which version of Bitbucket Server are you using on the primary and the mirror server?
Cheers,
Christian
Premier Support Engineer
Atlassian
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We have the same problem on Eclipse 4.8 and eclipse egit plugin 5.0.0
Is anybody aware of a solution yet?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.