[JIRA] [git-client] (JENKINS-22119) Fail to update update git repository with stored credential
Mikkel Larsen commented on JENKINS-22119 Fail to update update git repository with stored credential checkCredentials() seems to only deal with HTTP so I can't see how that would affect ssh? This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [git-client] (JENKINS-22119) Fail to update update git repository with stored credential
Mikkel Larsen edited a comment on JENKINS-22119 Fail to update update git repository with stored credential I finally had some time to dig into this. What caused the problem for me was that when you copy the https address from a private repository on bitbucket it is displayed as: https://usern...@bitbucket.org/username/repo.git and for a public repo it is: https://bitbucket.org/username/repo.git Removing the `username@` from the url in the jenkins setup, fixes the problem for private repos. A fix that would allow either format would be to strip the username@ from the url in the `checkCredentials()`: https://github.com/jenkinsci/git-client-plugin/blob/master/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java#L1854 e.g something like this: diff --git a/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java b/src/main/java/org/jenkins index 9fd48ab..feb95d2 100644 --- a/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java +++ b/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java @@ -1843,6 +1843,7 @@ public class CliGitAPIImpl extends LegacyCompatibleGitAPIImpl { */ private void checkCredentials(URIish u, StandardCredentials cred) { String url = "" +url = "" class="code-quote">"[\\w]+@", ""); final HttpClientBuilder clientBuilder = HttpClients.custom(); final CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); clientBuilder.setDefaultCredentialsProvider(credentialsProvider); This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [git-client] (JENKINS-22119) Fail to update update git repository with stored credential
Mikkel Larsen commented on JENKINS-22119 Fail to update update git repository with stored credential I finally had some time to dig into this. What caused the problem for me was that when you copy the https address from a private repository on bitbucket it is displayed as: https://usern...@bitbucket.com/username/repo.git and for a public repo it is: https://bitbucket.com/username/repo.git Removing the `username@` from the url in the jenkins setup, fixes the problem for private repos. A fix that would allow either format would be to strip the username@ from the url in the `checkCredentials()`: https://github.com/jenkinsci/git-client-plugin/blob/master/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java#L1854 e.g something like this: diff --git a/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java b/src/main/java/org/jenkins index 9fd48ab..feb95d2 100644 --- a/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java +++ b/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java @@ -1843,6 +1843,7 @@ public class CliGitAPIImpl extends LegacyCompatibleGitAPIImpl { */ private void checkCredentials(URIish u, StandardCredentials cred) { String url = "" +url = "" class="code-quote">"[\\w]+@", ""); final HttpClientBuilder clientBuilder = HttpClients.custom(); final CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); clientBuilder.setDefaultCredentialsProvider(credentialsProvider); This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [git] (JENKINS-22119) Fail to update update git repository with stored credential
Mikkel Larsen commented on JENKINS-22119 Fail to update update git repository with stored credential I can add a bit of information. Rolling back to 1.6.3 solves the problem. I get the error pulling from bitbucket, and it fails for every repo I pull from bitbucket. This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.