These are chat archives for jenkinsci/jenkins

9th
Mar 2018
Max
@maksimyugai
Mar 09 09:40
hi, guys. May anyone help me? I'm trying to build jenkins pipeline with guide "Build a Python app with PyInstaller" and I have error when I try to connect to git repo

I have following error: "Failed to connect to repository : Command "git ls-remote -h file://home/admin/jenkins-test/simple-python-pyinstaller-app HEAD" returned status code 128:
stdout:
stderr: fatal: '/admin/jenkins-test/simple-python-pyinstaller-app' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists."

I guess that this error related with authentication problem
I have 2fa in my github account
Michaël Pailloncy
@mpailloncy
Mar 09 09:46
This error doesn't seem to be related to your GitHub 2FA @maksimyugai. The job is configured to target a local Git repository located at /home/admin/jenkins-test/simple-python-pyinstaller-app which doesn't seem to be a Git repository
Max
@maksimyugai
Mar 09 09:46
I created in jenkins global user, added private key by chose Enter directly, enter passphrase and saved
@mpailloncy thank you for answer, yep, I was wrong, not with 2fa, I wanted to say with ssh sertificate.
I added private key and chose Enter key directly
Michaël Pailloncy
@mpailloncy
Mar 09 09:52
ok @maksimyugai. Is the Git URL correctly configured inside your job (which type of Job are you using ?)
Seems like it's targeting "/home/admin/jenkins-test/simple-python-pyinstaller-app" instead of something like "git@...:simple-python-pyinstaller-app"
Max
@maksimyugai
Mar 09 09:54
git url is 100% correctly, use pipeline job
I changed from file://home.... to git@:/home... and error was changed to stderr: ssh: Could not resolve hostname : Name does not resolve
Michaël Pailloncy
@mpailloncy
Mar 09 10:01
how are you running Jenkins ? Inside a container ? directly launched from the war (java -jar ...) / or with a service ?
Max
@maksimyugai
Mar 09 10:02
@mpailloncy yep, inside docker
Michaël Pailloncy
@mpailloncy
Mar 09 10:05
ok, have you clone the Git repository on your local machine or inside the container ?
Max
@maksimyugai
Mar 09 10:05
yep
I cloned
Michaël Pailloncy
@mpailloncy
Mar 09 10:06
but on your local machine ? or inside the container ? If it's on your local machine, the Jenkins inside the container will not be able to access it
just have a look to the tutorial, do you have "mounted" /home in your container (option '-v "$HOME":/home') ?
Max
@maksimyugai
Mar 09 10:10
@mpailloncy ok, thank you very much, I got problem
I cloned repo in my local machine
Max
@maksimyugai
Mar 09 10:22
@mpailloncy I saw inside container and there is a git repo there
@mpailloncy can you write full command with option '-v "$HOME":/home')
Michaël Pailloncy
@mpailloncy
Mar 09 10:25
Max
@maksimyugai
Mar 09 10:25
yes, I did it
@mpailloncy ok, I'll do it again
Max
@maksimyugai
Mar 09 10:54
@mpailloncy may you say how I can delete jenkins docker image with configuration? When I delete docker image and run it again all jobs appears again
Michaël Pailloncy
@mpailloncy
Mar 09 11:05
the command you launched to start the Jenkins container (as defined in the tutorial) automatically creates a Docker volume (jenkins-data)
If you want to start from scratch and delete all previously created configuration, you probably need to run something like "docker volume rm jenkins-data"
Max
@maksimyugai
Mar 09 12:31
@mpailloncy look, I have different users in local machine and container, is it ok?
Michaël Pailloncy
@mpailloncy
Mar 09 13:46
that should not be a problem
Mohamed Ait Taleb
@mohamedaittaleb
Mar 09 14:43
@maksimyugai make sure that you added a user with correct permissions on jenkins, that will be used to pull the project. once you confirm this you can go further with other investigations
Jeremy Lardet (MicroEJ)
@jlardet
Mar 09 14:54
Hi everyone, I'm using pipeline and having hard time publishing a git tag at the end of my build despite git clone did work...
At the beginning of the build, I have this log:
using GIT_SSH to set credentials <user>@<repo>
Does anyone know how I can achieve the same thing by my own in my pipeline script?
I think I can't push my tag because of missing credentials
or if I can what is, I suppose, an environment variable
joseenriquevasquez
@joseenriquevasquez
Mar 09 19:56
Should branch indexing for multi-branch pipeline work be triggered automatically by webhooks?
is there any way to achieve this?
webhook sends tags information but I do not see those on multibranch pipeline
unless I chick "Scan Multibranch Pipeline Now"