Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7900109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:53:07+00:00 2026-06-03T08:53:07+00:00

[Update2] So is it OK that when I run git from the CLI it

  • 0

[Update2]
So is it OK that when I run git from the CLI it prompts me for the password? I am able to access the github servers with the passphrase for the ssh private key, but I am never prompted for this in Jenkins or asked to provide it.
[/Update2]

[Update]
Yes. I am running this on a ubuntu instance on EC2. I’ve generated the ssh keys in /var/lib/jenkins/.ssh which is the user that Jenkins creates. I’ve set the security option in Jenkins to use Unix user/groups.
[/Update]

I am trying to have Jenkins pull from git (github). I get the following error:

hudson.plugins.git.GitException: Could not clone [my personal repo]
    at hudson.plugins.git.GitAPI.clone(GitAPI.java:245)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1121)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1063)
    at hudson.FilePath.act(FilePath.java:832)
    at hudson.FilePath.act(FilePath.java:814)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1063)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1218)
    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:581)
    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:470)
    at hudson.model.Run.run(Run.java:1434)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:239)
Caused by: hudson.plugins.git.GitException: Command "git clone --progress -o origin git@github.com:bobbylo/Verbify.git /var/lib/jenkins/.jenkins/jobs/build_dev/workspace" returned status code 128:
stdout: Initialized empty Git repository in /var/lib/jenkins/.jenkins/jobs/build_dev/workspace/.git/

stderr: Permission denied (publickey).
fatal: The remote end hung up unexpectedly

I’ve already gone through the Github ssh tutorial. I’ve generated a private key on an EC2 instance. Placed it into the .ssh directory of the user, jenkins. Placed the public key on Github (tried both Deploy Key + normal SSH Key). I’ve verified that I can do git over-the-wire operations (pull, clone, etc.) and that it works from the CLI with the user. I’ve set the unix user/group permissions correctly for the user (in fact when I change it, I see the error log change in Jenkin’s console log). When I try to use the Jenkin git plugin or do a Jenkins shell command, I get the error above.

I’ve read about ssh-agent and ssh-add and how you can tie it to your shell startup script so you don’t need to enter a password for every command — I am not sure if that’s relevant here.

Otherwise I am not sure what else I can try. Any tips would be helpful!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:53:08+00:00Added an answer on June 3, 2026 at 8:53 am

    Figured it out:

    -It turns out if you’re running it not as a daemon it uses the shell environment in which you ran it.
    -It also turns out any cmd that requires user prompt (like ssh paraphrase) Jenkins treats as an error.

    The solution for now is to:

    -Run Jenkins after I have added the github pub key to ssh-agent via ssh-add so that it doesn’t prompt for the paraphrase.

    If I wanted to run Jenkins as a daemon process I’d imagine having to set up ssh-agent correctly before running it (I don’t think it uses the current shell environment?).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I typically run a script each night that updates my code from SVN, then
Assuming that I cannot run something like this with Fabric: run(svn update --password 'password'
I'm trying to run a git push from cron. When I do the command
I've moved files from Project to Project/src . Git is under the impression that
I would like to add an update hook to git that prevents people from
I would like to add an update hook to git that prevents people from
I need to embed Git and Gecko/WebKit in a C# application that should run
I have some update or something that tries to run every night, and ends
I'm trying to run an update query that updates one table based on rows
I have a few SQL (Select/Update/Insert) syntax that I will run inside PL/SQL one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.