Details
-
Bug
-
Status: Done
-
Medium
-
Resolution: Fixed
-
4.1.2
-
None
-
None
-
Sprint 26 - Ends Aug 16, Sprint 26 - Ends Sept 1, Sprint 26 - Ends Oct 3
-
0
Description
When you enter a username who does not exist when setting up a mirror you get the following error message:
com.atlassian.bitbucket.scm.CommandFailedException: '/usr/bin/git fetch --force --prune https://[account]@googlemail.com:[password]@bitbucket.org/[team-name]/[repository-name] +refs/:refs/' exited with code 128 saying: fatal: https://[account]@googlemail.com:[password]@bitbucket.org/[team-name]/[repository-name]/info/refs not valid: is this a git repository?
at com.atlassian.bitbucket.scm.DefaultCommandExitHandler.onError(DefaultCommandExitHandler.java:46)
at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.evaluateThrowable(GitCommandExitHandler.java:106)
at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.onError(GitCommandExitHandler.java:160)
at com.atlassian.stash.internal.scm.git.command.fetch.MirrorFetchCommandHandler$RemoteFetchExitHandler.onError(MirrorFetchCommandHandler.java:289)
at com.atlassian.bitbucket.scm.DefaultCommandExitHandler.onExit(DefaultCommandExitHandler.java:31)
at com.atlassian.stash.internal.scm.git.command.fetch.FetchExitHandler.onExit(FetchExitHandler.java:39)
We should validate the username exists and then return a more useful error message. Also previewing with an invalid username, shows that it works when it doesn't so we should add username validation on that too.