Git 1.7.10 is the minimum required version (the plugin now uses the prune argument rather than mirror), so your git version shouldn't be the problem. If you search the atlassian-stash.log file for com.englishtown you should see some results if there are errors or warnings. If you want to see logs for successful mirror operations you would need to enable the debug log flag for stash. If you send me the errors/warnings from the log I can try to help interpret them.
Hello Adrian,
While using this plugin, I'm getting the below error: I see I've given the correct permission to the user id which is trying to do the push. Could you please help here what could be the reason for this issue?
2015-07-14 14:03:01,431 WARN [threadpool:thread-3256] spa7cob @79GR64x836x15768x5 1gnulae 10.169.110.72 "PUT /rest/api/latest/projects/SCM/repos/testgross/settings/hooks/com.englishtown.stash-hook-mirror%3Amirror-repository-hook/settings HTTP/1.1" c.e.stash.hook.MirrorRepositoryHook Failed to mirror repository TestGross, retrying in 1 minute (attempt 4 of 5).
2015-07-14 14:03:05,466 ERROR [threadpool:thread-3259] spa7cob @79GR64x834x15663x6 1gnulae 10.169.110.72 "PUT /rest/api/latest/projects/SCM/repos/testgross/settings/hooks/com.englishtown.stash-hook-mirror%3Amirror-repository-hook/settings HTTP/1.1" c.e.stash.hook.MirrorRepositoryHook Failed to mirror repository TestGross after 5 attempts.
com.atlassian.stash.exception.ServerException: An error occurred while executing an external process: process timed out
at com.atlassian.stash.scm.git.common.command.GitCommandExitHandler.evaluateThrowable(GitCommandExitHandler.java:113) ~[na:na]
at com.atlassian.stash.scm.git.common.command.GitCommandExitHandler.onError(GitCommandExitHandler.java:159) ~[na:na]
at com.atlassian.stash.scm.DefaultCommandExitHandler.onExit(DefaultCommandExitHandler.java:33) ~[stash-spi-3.7.3.jar:na]
at com.englishtown.stash.hook.PasswordHandler.onExit(PasswordHandler.java:46) ~[plugin_8010731744124896622_stash-hook-mirror-1.9.0_1431603207654.jar:na]
at com.atlassian.stash.scm.BaseCommand.callExitHandler(BaseCommand.java:138) ~[stash-spi-3.7.3.jar:na]
at com.atlassian.stash.scm.BaseCommand$CommandFuture.internalGet(BaseCommand.java:251) ~[stash-spi-3.7.3.jar:na]
at com.atlassian.stash.scm.BaseCommand$CommandFuture.get(BaseCommand.java:220) ~[stash-spi-3.7.3.jar:na]
at com.atlassian.stash.scm.BaseCommand.call(BaseCommand.java:75) ~[stash-spi-3.7.3.jar:na]
at com.englishtown.stash.hook.MirrorRepositoryHook$1.call(MirrorRepositoryHook.java:127) [plugin_8010731744124896622_stash-hook-mirror-1.9.0_1431603207654.jar:na]
at com.englishtown.stash.hook.MirrorRepositoryHook$1.call(MirrorRepositoryHook.java:115) [plugin_8010731744124896622_stash-hook-mirror-1.9.0_1431603207654.jar:na]
at com.atlassian.stash.internal.concurrent.StateTransferringExecutorService$StateTransferringCallable.call(StateTransferringExecutorService.java:147) [stash-platform-3.7.3.jar:na]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_40]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_40]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_40]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_40]
at java.lang.Thread.run(Thread.java:724) [na:1.7.0_40]
... 1 frame trimmed
Caused by: com.atlassian.utils.process.ProcessTimeoutException: process timed out
at com.atlassian.utils.process.ExternalProcessImpl.wrapUpProcess(ExternalProcessImpl.java:656) ~[atlassian-processutils-1.6.0-m2.jar:na]
at com.atlassian.utils.process.ExternalProcessImpl.finish(ExternalProcessImpl.java:161) ~[atlassian-processutils-1.6.0-m2.jar:na]
at com.atlassian.stash.scm.BaseCommand$CommandFuture.get(BaseCommand.java:218) ~[stash-spi-3.7.3.jar:na]
... 10 common frames omitted
2015-07-14 14:04:47,055 ERROR [threadpool:thread-3273] spa7cob @79GR64x836x15768x5 1gnulae 10.169.110.72 "PUT /rest/api/latest/projects/SCM/repos/testgross/settings/hooks/com.englishtown.stash-hook-mirror%3Amirror-repository-hook/settings HTTP/1.1" c.e.stash.hook.MirrorRepositoryHook Failed to mirror repository TestGross after 5 attempts.
com.atlassian.stash.exception.CommandFailedException: 'C:\Program Files (x86)\Git\cmd\git.exe push --prune file:////10.38.5.50/Git_Mirror/SCM/testgross.git --force +refs/heads/*:refs/heads/* +refs/tags/*:refs/tags/*' exited with code 128 saying: fatal: Unable to create '//10.38.5.50/Git_Mirror/SCM/testgross.git/refs/heads/master.lock': Permission denied
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
at com.atlassian.stash.scm.DefaultCommandExitHandler.onError(DefaultCommandExitHandler.java:47) ~[stash-spi-3.7.3.jar:na]
at com.atlassian.stash.scm.git.common.command.GitCommandExitHandler.evaluateThrowable(GitCommandExitHandler.java:105) ~[na:na]
at com.atlassian.stash.scm.git.common.command.GitCommandExitHandler.onError(GitCommandExitHandler.java:159) ~[na:na]
at com.atlassian.stash.scm.DefaultCommandExitHandler.onExit(DefaultCommandExitHandler.java:33) ~[stash-spi-3.7.3.jar:na]
at com.englishtown.stash.hook.PasswordHandler.onExit(PasswordHandler.java:46) ~[plugin_8010731744124896622_stash-hook-mirror-1.9.0_1431603207654.jar:na]
at com.atlassian.stash.scm.BaseCommand.callExitHandler(BaseCommand.java:138) ~[stash-spi-3.7.3.jar:na]
at com.atlassian.stash.scm.BaseCommand$CommandFuture.internalGet(BaseCommand.java:251) ~[stash-spi-3.7.3.jar:na]
at com.atlassian.stash.scm.BaseCommand$CommandFuture.get(BaseCommand.java:220) ~[stash-spi-3.7.3.jar:na]
at com.atlassian.stash.scm.BaseCommand.call(BaseCommand.java:75) ~[stash-spi-3.7.3.jar:na]
at com.englishtown.stash.hook.MirrorRepositoryHook$1.call(MirrorRepositoryHook.java:127) [plugin_8010731744124896622_stash-hook-mirror-1.9.0_1431603207654.jar:na]
at com.englishtown.stash.hook.MirrorRepositoryHook$1.call(MirrorRepositoryHook.java:115) [plugin_8010731744124896622_stash-hook-mirror-1.9.0_1431603207654.jar:na]
at com.atlassian.stash.internal.concurrent.StateTransferringExecutorService$StateTransferringCallable.call(StateTransferringExecutorService.java:147) [stash-platform-3.7.3.jar:na]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_40]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_40]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_40]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_40]
at java.lang.Thread.run(Thread.java:724) [na:1.7.0_40]
... 1 frame trimmed
Caused by: com.atlassian.utils.process.ProcessException: Non-zero exit code: 128
at com.atlassian.stash.scm.SummarizingProcessHandler.complete(SummarizingProcessHandler.java:53) ~[stash-spi-3.7.3.jar:na]
at com.atlassian.utils.process.ExternalProcessImpl.wrapUpProcess(ExternalProcessImpl.java:659) ~[atlassian-processutils-1.6.0-m2.jar:na]
at com.atlassian.utils.process.ExternalProcessImpl.finish(ExternalProcessImpl.java:161) ~[atlassian-processutils-1.6.0-m2.jar:na]
at com.atlassian.stash.scm.BaseCommand$CommandFuture.get(BaseCommand.java:218) ~[stash-spi-3.7.3.jar:na]
... 10 common frames omitted
Regards,
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for answering Adrian,
I've tried the 1.4 version of the plugin and this time was easily installed from the atlassian marketplace.
The plugin still not working for me but I found in the release notes that git 1.7.11 or higher is needed.
We are running 1.7.10 in the mirrors and this could be the cause for the failure. Maybe I'll try it again later after we upgrade git.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Enrique,
Sorry to hear you're having problems. It's strange it didn't show through the universal plugin manager. What version of stash are you running? Perhaps, it wasn't recognized as a supported version (I recently updated the information to support 2.3.0 to 2.5.2).
There is logging, you can try checking the installation logs/ directory (for me that is /opt/atlassian/stash/logs). I think it would be in the locahost-XXXX-XX-XX.log file. If you enable the debug flag it should log each time the hook runs, I believe the default only log errors and possibly warnings:
Hope this helps. You can also enter issues via Github Issues:
https://github.com/englishtown/stash-hook-mirror/issues
-a
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.