SCM Manager : jenkins can not get and build git projects

1,094 views
Skip to first unread message

afafe benkirane

unread,
Sep 2, 2014, 9:40:01 AM9/2/14
to scmma...@googlegroups.com
Hi, 

I am a beginner in scmmanager and jenkins.

I installed SCM-manager to manage our git repositories + jenkins plugin. A powerful tool, thank you 

Now, I tried to use it. However, we have some problems to get projects and analyse them within jenkins.
So, if you have any idea about our problem, your knowledge will be very helpful.

You will find attached the configuration.

Capture_01.PNG
Capture_02.PNG
Capture_03.PNG

Sebastian Sdorra

unread,
Sep 2, 2014, 10:48:08 AM9/2/14
to scmma...@googlegroups.com
Hi,
The simplest way to setup jenkins for SCM-Manager git repositories is to use the global configuration at Config->General->Jenkins Settings. But the global configuration is overridden, if you data to the jenkins tab on the repository. So please remove the data from the jenkins tab of the repository. The error from jenkins looks like, you do not send the credentials for the scmadmin user.

Sebastian


--
You received this message because you are subscribed to the Google Groups "scmmanager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scmmanager+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

afafe benkirane

unread,
Sep 2, 2014, 11:08:09 AM9/2/14
to scmma...@googlegroups.com
Hi,
thank you for response.
Now, I used just global configuration but i still have the same problem.
Any idea



--
You received this message because you are subscribed to a topic in the Google Groups "scmmanager" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scmmanager/ycx-Zy5OQJU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scmmanager+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Cordialement,

Afafe BENKIRANE


Sebastian Sdorra

unread,
Sep 5, 2014, 2:20:28 AM9/5/14
to scmma...@googlegroups.com
Hi,
Is the name of your project myproject.git? I'm not sure but this could be a problem, because you could access each git repositroy in scm-manager with the name or the repository + .git.

Sebastian

Afafe BENKIRANE

unread,
Sep 5, 2014, 10:08:06 AM9/5/14
to scmma...@googlegroups.com
Hi,

myproject.git is the repository of my project and jenkins request the repository URL, so I gave him the link to the repository of my project. 
but, I did not quite understand what you mean by "I'm not sure but this could be a problem, because you could access each git repositroy in scm-manager with the name or the repository + .git"
thank you.

Sebastian Sdorra

unread,
Sep 9, 2014, 2:43:15 AM9/9/14
to scmma...@googlegroups.com
You can access each git repository in scm-manager with its name + .git e.g. repository /scm/git/test is also accessible at /scm/git/test.git. But you've named your repository with .git at the end and perhaps this causes a bug. Could you please test the jenkins checkout with a new repository called test?

Sebastian

Afafe BENKIRANE

unread,
Sep 9, 2014, 5:42:51 AM9/9/14
to scmma...@googlegroups.com
Hi,

I tested this and I have the same problem "403 error", i think the problem is in the scm manager because i already tested with github and it works.
I'm stuck and I can not move, I can not understand what to do as configuration to resolve this problem, please help me if you can.
For info, I do not use authentication in jenkins.

thank you.

Capture02.PNG
Capture03.PNG
Capture01.PNG

Sebastian Sdorra

unread,
Sep 9, 2014, 7:11:12 AM9/9/14
to scmma...@googlegroups.com
Status code 403 means you do not send valid credentials. Please use the repository url without username (http://milabserver:8081/scm/git/Test) and use valid credentials. I mean credentials which are able to clone the repository.

Sebastian

Afafe BENKIRANE

unread,
Sep 9, 2014, 9:09:03 AM9/9/14
to scmma...@googlegroups.com
I used all the solutions that you give me and it still does not work. 

Sebastian Sdorra

unread,
Sep 9, 2014, 10:53:23 AM9/9/14
to scmma...@googlegroups.com
Ok, i've setup a fresh scm-manager installation with a fresh jenkins installation. I've installed both services on the same machine with different ports. SCM-Manager uses port 8081 and Jenkins uses port 8080. Here are my steps:

- download scm-manager 1.40
- configure port to 8081
- create git repository named test

- download jenkins
- start jenkins
- install git-plugin plugin
- restart jenkins
- create freestyle jenkins job named test
- choose Git as "Source Code Management"
- insert "http://localhost:8081/scm/git/test" as "Repository URL"
- press "Add" button below the credentials field
- choose Kind: "Username with password", Scope: Global, Username: scmadmin, Password: scmadmin
- select scmadmin/****** from the credentials checkbox
- click save

The above setup worked without any problems. The interesting is, i've tried to reproduce the error message you get. But i've never seen error 403. It sounds like your jenkins does not talk to the scm-server, it is possible that you jenkins installation talks to a different server? Do you use a reverse proxy? Could you please describe your whole setup (machines, plugins, users, etc.)?

Sebastian

Sebastian Sdorra

unread,
Sep 9, 2014, 12:04:01 PM9/9/14
to scmma...@googlegroups.com
The message could also mean that you user has not enough privileges to access you repository. Has the user read access to the repository? Could you try to use the user (which is configured in jenkins) to access the web ui of scm-manager. Did you see the repository with this user?

Sebastian

Michael Munsey

unread,
Sep 9, 2014, 12:14:24 PM9/9/14
to scmma...@googlegroups.com
I wonder if Jenkins understands that you are doing git over http and not using the git protocol.

Sebastian Sdorra

unread,
Sep 9, 2014, 1:35:38 PM9/9/14
to scmma...@googlegroups.com
If you give jenkins an http:// url, it will use http for the checkout. Only if you insert a git:// url, jenkins will use the git protocol for the checkout.

Sebastian

2014-09-09 18:14 GMT+02:00 Michael Munsey <mun...@gmail.com>:
I wonder if Jenkins understands that you are doing git over http and not using the git protocol.

--

Afafe BENKIRANE

unread,
Sep 10, 2014, 5:56:31 AM9/10/14
to scmma...@googlegroups.com
Hi sebastian,

Thank you for your very detailed answer. 
I redid the whole configuration on another computer and it gives the same wrong thing happily. 

My setup is as : 
- windows 7 machine
- proxy

--> for scm manager
- download scm-manager 1.40
- configure port to 8081
- create git repository named test
- configure proxy
- download scm-jenkins-plugin
- restart
- in general -> jenkins configuration -> Url "http://localhost:8080/
- save

--> For jenkins
- download jenkins 1.579 for windows
- start jenkins
- in administer jenkins -> configure the system -> configure JDK, Maven and Git
- install git-plugin
- restart jenkins
- creat jenkins user with "Connected users can do everything" with name as scmadmin and password scmadmin
- create freestyle jenkins job named test
- choosed Git as "Source Code Management"
- inserted "http://localhost:8081/scm/git/test" as "Repository URL"
- Error " Failed to connect to repository : Failed to connect to http://localhost:8081/scm/git/test using credentials  (status = 403) "
- pressed "Add" button below the credentials field
- choosed Kind: "Username with password", Scope: Global, Username: scmadmin, Password: scmadmin
- selected scmadmin/****** from the credentials checkbox
- Error " Failed to connect to repository : Failed to connect to http://localhost:8081/scm/git/test using credentials  (status = 403) "
- save
- start build 
- console output "the attached capture"

thank you for helping me.
Excuse me if I bothered you.
console Output.PNG

Sebastian Sdorra

unread,
Sep 15, 2014, 2:48:52 AM9/15/14
to scmma...@googlegroups.com
Ok, i think the problem is the proxy server. I think scm-manager routes the jenkins request through the proxy. Could you try to put your jenkins server in the proxy excludes of scm-manager?

Sebastian

Afafe BENKIRANE

unread,
Sep 15, 2014, 6:01:00 AM9/15/14
to scmma...@googlegroups.com
Hi,

thank you sebastian for your response. 
I found another way to resolve the problem is that Instead of inserting : http://localhost:8081/scm/git/test , i inserted directory of the repository  C:\.....\scm\git\test   and it work.
thank you for all.
Reply all
Reply to author
Forward
0 new messages