jenkins issue

1,403 views
Skip to first unread message

pooja pooja

unread,
Oct 10, 2022, 8:19:34 AM10/10/22
to Jenkins Users
in jenkins am getting below error
New release '22.04.1 LTS' available. Run 'do-release-upgrade' to upgrade to it.
 fatal: could not read Username for 'https://github.com': No such device or address
 Use --update-env to update environment variables

Mark Waite

unread,
Oct 10, 2022, 8:32:30 AM10/10/22
to Jenkins Users
On Monday, October 10, 2022 at 6:19:34 AM UTC-6 Pooja wrote:
in jenkins am getting below error
New release '22.04.1 LTS' available. Run 'do-release-upgrade' to upgrade to it.

That message is displayed when you're running an older version of Ubuntu, like 20.04 or 18.04.  They are trying to encourage you to upgrade so that you can remain on a supported operating system version.
 
 fatal: could not read Username for 'https://github.com': No such device or address

https://stackoverflow.com/questions/40274484/fatal-could-not-read-username-for-https-github-com-device-not-configured indicates that usually means you're not using a credential with an HTTPS private git repository.  A credential is required and the credential has not been provided or is no longer valid.

 Use --update-env to update environment variables

Sorry, I don't recognize that message

Mark Waite

Mithun Raj

unread,
Oct 10, 2022, 9:45:32 AM10/10/22
to jenkins...@googlegroups.com
1. Update your OS,

2. Check if the Git credentials are injected correctly,
If running from bastion host or jump box make sure your git hub or enterprise hostnames and IP are updated (ask git admin) in the hosts file under /etc/hosts

3. Update—env is the Git global env for git
You can either set or unset those in your Linux machine it’s your Git ID and pass which you can set as global access. not recommended if you have set it under Jenkins credentials.


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/cec7b2ee-88ba-417d-be66-95d4954dbbfen%40googlegroups.com.

pooja pooja

unread,
Oct 11, 2022, 12:30:00 AM10/11/22
to jenkins...@googlegroups.com

pooja pooja

unread,
Oct 11, 2022, 7:37:53 AM10/11/22
to jenkins...@googlegroups.com
Hi mark and Mithun,

am getting error in jenkins 
image.png

Ivan Fernandez Calvo

unread,
Oct 11, 2022, 12:28:26 PM10/11/22
to Jenkins Users
The error is related to something your script is doing, it is not related to Jenkins at all. Try to review the code you are executing and figure out which line is and what is wrong. Googling the error seems related to configuring the git user and git email and the git authentication when you access GitHub using HTTPS URLs. It seems to be an error message from Ruby code. The solution seems to add the authentication to the URL or use an authentication store proper for your environment (I preferer to use gh see https://cli.github.com/manual/gh_auth_setup-git), but I am not sure depends on your script.

https://stackoverflow.com/questions/54454853/fatal-could-not-read-username-for-https-github-com-no-such-device-or-addr

Ivan Fernandez Calvo

unread,
Oct 11, 2022, 12:30:39 PM10/11/22
to Jenkins Users
one more thing to pass the Git credentials to your script you could check this articles

https://www.jenkins.io/blog/2021/07/27/git-credentials-binding-phase-1/

pooja pooja

unread,
Oct 12, 2022, 2:13:15 AM10/12/22
to jenkins...@googlegroups.com
this is my deploy.sh file
#!/bin/bash

ssh ubu...@65.0.256.137 <<EOF
#cd /home/ubuntu/GJ_DEV/GJ_API
cd  gj/pat
sudo git pull
pm2 restart all
pm2 status

pipeline script
currentBuild.displayName = "gj-api-#"+currentBuild.number
pipeline{
    agent any
    stages{
        stage("GITLAB_CHECKOUT"){
            steps{
                git branch: 'development', credentialsId: 'GITHUB1', url:'https://github.com/gj/pat.git'
            }
        }
        stage("pm2 start"){
            steps{
                sh 'chmod u+x ./scripts/deploy.sh'
                sh './scripts/deploy.sh'
            }
        }
    }


can you guys tell me, where the script was wrong,am not able to find the error



Iván Fernández Calvo

unread,
Oct 12, 2022, 4:53:09 AM10/12/22
to jenkins...@googlegroups.com
You do not pass any credentials around the script in the pipeline,
So the command “git pull” failed because does not have a way to authenticate. Check the article and the video of my previous message, there is explained how to pass credentials to your script.

El 12 oct 2022, a las 8:13, pooja pooja <pooja...@gmail.com> escribió:


You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/4MFd7CVFD3U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANJUvtw-EsuDApVVxmECUL9ZDhyKxJff5jN%2ByxgPcJXxUhh8nw%40mail.gmail.com.

pooja pooja

unread,
Oct 12, 2022, 4:58:13 AM10/12/22
to jenkins...@googlegroups.com
I tried above videos and  whatever suggestion avaialable in google but still am getting same issue

Reply all
Reply to author
Forward
0 new messages