[ 
https://issues.jenkins-ci.org/browse/JENKINS-13410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=161786#comment-161786
 ] 

Dragan Gajic commented on JENKINS-13410:
----------------------------------------

As a workaround you can use parameters when defining repository url 
(http://${GIT_USERNAME}:${GIT_PASSWORD}@repo/url).
Then you can use the same url for the git hook, just you need to encode $ and 
{} (if you use linux/bash).
{code}
curl 
http://jenkins/git/notifyCommit?url=http://\$\\{GIT_USERNAME\\}:\$\\{GIT_PASSWORD\\}@repo/url
{code}
This way you will avoid to expose credentials.
                
> Git notifyCommit doesn't trigger if the configured repository url has a 
> user/password, but the trigger one doesn't
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: JENKINS-13410
>                 URL: https://issues.jenkins-ci.org/browse/JENKINS-13410
>             Project: Jenkins
>          Issue Type: Bug
>          Components: git
>         Environment: Windows Server 2008 R2, SCM Manager
>            Reporter: Ɓukasz Pater
>            Assignee: Nicolas De Loof
>            Priority: Minor
>
> When notifying about a repo update we use the url: 
> http://jenkins/git/notifyCommit?url=http://repo/url
> This doesn't trigger polling for builds that have a http user/password 
> defined in the repository url (http://user:pass@repo/url). 
> Calling the trigger url with the user/password works correctly. Would be nice 
> if they could be omitted though.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to