Q:

Jenkins clone fails with AWS code-commit repository (status code 143)

I have installed Jenkins in my Mac & i am trying to clone an AWS code-commit repository (URL looks like this: https://git-codecommit.us-east-1.amazonaws.com/v5/repos/testRepo). 
The repository is only a few MB which can be cloned using terminal using git clone command but Jenkins throws the following error 
ERROR: Timeout after 10 minutes
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://git-codecommit.us-east-1.amazonaws.com/v5/repos/testRepo
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:888)
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1155)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)
    at hudson.scm.SCM.checkout(SCM.java:504)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
    at hudson.model.Run.execute(Run.java:1810)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:429)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://git-codecommit.us-east-1.amazonaws.com/v5/repos/testRepo +refs/heads/*:refs/remotes/origin/*" returned status code 143:
stdout: 
stderr: 
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2016)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1735)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:420)
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:886)
    ... 11 more
ERROR: Error fetching remote repo 'origin'
Finished: FAILURE

I have also increased the timing to 30 mins but no luck. I expect Jenkins to clone the repository without any error.
Any help is highly appreciated.

A:

It seems that you have an issue with your user access. To resolve it, you can try to use ssh instead of https in your configuration or re-install Jenkins from command line (this issue occurs sometimes for MacOS users if Jenkins was installed by using .pkg file). See answers to this question for more details.

