EGit: cannot push, cannot pull - eclipse

I'am using EGit and I commited a change to my local git repository.
I'd like to push this change to a remote.
When doing that, a dialog screen pops up which shows "rejected-master-master-non-fast-forward". The answer of this linked question states that I have to pull first.
When doing the pull, an EGit exception is thrown:
org.eclipse.jgit.api.errors.TransportException: Nothing to fetch.
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)
at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:253)
at org.eclipse.egit.core.op.PullOperation$1.run(PullOperation.java:97)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.egit.core.op.PullOperation.execute(PullOperation.java:128)
at org.eclipse.egit.ui.internal.pull.PullOperationUI.execute(PullOperationUI.java:139)
at org.eclipse.egit.ui.internal.pull.PullOperationUI$1.runInWorkspace(PullOperationUI.java:114)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.errors.TransportException: Nothing to fetch.
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1087)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
... 8 more
It seems that I'm stuck. Who can help me out?
UPDATE
The .git/config file in my repository contains (remote URL hid):
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "origin"]
url = <URL_HIDDEN>
I'm using Eclipse Git Team Provider 3.4.1.201406201815

The configuration of the repository seems to miss this line in the [remote "origin"] section:
fetch = +refs/heads/*:refs/remotes/origin/*
It tells git to fetch all refs starting with refs/heads/ (all branches) and store them under refs/remotes/origin/ locally. E.g. the refs/heads/master in the remote repository will become refs/remotes/origin/master locally (or origin/master in short).
Can you add that and try if it makes pull work?
Also, it would be very interesting to know in which way you first created/cloned this repository.

I also faced the same problem when using egit and could not pull the changes. But previous answer helped a lot. Now, there can be two ways to update the config file.
Direct Update in the file : Goto local_repo_location/.git/ and open config file and add :
[remote "origin"]
url = YOUR_REPO_URL
push = ALREADY_FILLED_VALUE
fetch = +refs/heads/:refs/remotes/origin/
Updating config using eclipse : Goto Windows -> Preferences -> Team -> Git -> Configuration and now under Repository Settings tab look under -> remote -> origin.
Problem is there is no key for fetch.
Now click : Add Entry and provide the values as follows :
Key : remote.origin.fetch
Value : +refs/heads/:refs/remotes/origin/
Now we are done.

i had the same problem pulling from remote repo was giving error (org.eclipse.jgit.api.errors.transportexception)
here's what i did
changed the origin to my fork account and pulled.
changed the origin back to the actual value and pulled.
donot really know about the problem of egit but this two simple steps solved my problem, hope it helps

Related

Hugo Github Pages Error

I'm in the midst of starting a basic blog. I decided to try implementing github pages for the back end of my site using this particular theme (https://github.com/vickylai/hugo-theme-introduction).
I am able to successfully run both my site and my theme locally. However if I go to my pages link (https://ericksnetwork.github.io/) I get this 404 error:
File not found
The site configured at this address does not contain the requested file.
If this is your site, make sure that the filename case matches the URL.
For root URLs (like http://example.com/) you must provide an index.html file.
Read the full documentation for more information about using GitHub Pages.
I followed everything on the Hugo guidelines along with the guidelines on the actual github theme readme. Any advice would be appreciated.
This is the folder structure of what currently works locally:
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\.gitignore
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\.travis.yml
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\archetypes
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\archetypes\blog.md
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\archetypes\default.md
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\archetypes\projects.md
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\CHANGELOG.md
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite\config.toml
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite\content
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite\content\about.md
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite\content\blog
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite\content\blog\coffee-ipsum.md
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite\content\blog\hipster-ipsum.md
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite\content\blog\startup-ipsum.md
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite\content\contact.md
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite\content\projects
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite\content\projects\Design.md
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite\content\projects\Photography.md
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite\content\projects\Writing.md
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite\static
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite\static\img
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite\static\img\camera.jpg
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite\static\img\fav.ico
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite\static\img\plant.jpg
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite\static\img\profile.jpg
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\exampleSite\static\img\workday.jpg
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\images
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\images\screenshot.png
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\images\tn.png
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\_default
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\_default\list.html
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\_default\single.html
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\_default\taxonomy.html
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\_default\terms.html
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\404.html
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\blog
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\blog\list.html
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\blog\single.html
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\index.html
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\partials
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\partials\blogsection.html
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\partials\footer.html
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\partials\header.html
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\partials\li.html
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\partials\nav-list.html
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\partials\nav-single.html
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\partials\projects.html
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\partials\social.html
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\projects
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\layouts\projects\list.html
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\LICENSE
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\README.md
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\sass
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\sass\dark-style.sass
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\sass\light-style.sass
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\css
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\css\dark-style.css
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\css\font-awesome.min.css
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\css\light-style.css
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\css\nunito_sans.css
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\fontawesome-webfont.eot
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\fontawesome-webfont.svg
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\fontawesome-webfont.ttf
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\fontawesome-webfont.woff
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\fontawesome-webfont.woff2
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\FontAwesome.otf
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\NunitoSans-Black.ttf
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\NunitoSans-BlackItalic.ttf
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\NunitoSans-Bold.ttf
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\NunitoSans-BoldItalic.ttf
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\NunitoSans-ExtraBold.ttf
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\NunitoSans-ExtraBoldItalic.ttf
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\NunitoSans-ExtraLight.ttf
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\NunitoSans-ExtraLightItalic.ttf
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\NunitoSans-Italic.ttf
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\NunitoSans-Light.ttf
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\NunitoSans-LightItalic.ttf
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\NunitoSans-Regular.ttf
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\NunitoSans-SemiBold.ttf
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\NunitoSans-SemiBoldItalic.ttf
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\fonts\OFL.txt
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\img
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\img\favicon.ico
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\img\workday.jpg
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\js
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\js\jquery-3.3.1.min.js
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\js\moment-timezone-with-data-2012-2022.js
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\js\moment-timezone.js
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\static\js\moment.js
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\textfile.txt
C:\Users\erick\Documents\Projects\ericksnetwork.github.io\themes\introduction\theme.toml
In case anyone stumbles across this in the future - I was simply missing the "hugo" command which publishes your site into a Public folder. This you then drop into your 'pages' repository.
I just hit your github link http://USERNAME.github.io and it is working fine now for you.
Enjoy !!! github services.
In case you have cloned from
https://github.com/vickylai/hugo-theme-introduction
then you first need to set-url for your own account.
Cross check :
Step 1. in gitbash type the command : git remote -v and look for the address where the changes will be pushed from git.
Step 2: Set the new url to your repository address :
git remote set-url origin https://github.com/YourUserName/NameofYourRepo
Step 3: remote -v . Now the adress to push your changes will have changed and you can push easily by .
Step 4 : git push origin master
Hope that resolves your issue.

Jenkins Git Plugin

I am getting the below error when attempting a Jenkins build of a project from a GitHub repository for a poc. Jenkins is a local install and I am using the https address for git with thge username and password I use to login to GitHub. Can anyone offer me some pointers here as I am new to both Jenkins and GitHub
Building in workspace C:\Program Files (x86)\Jenkins\workspace\AdventureWorks2014 - 1. Build
Cloning the remote Git repository
Cloning repository https://github.com/h020905a/AdventureWorks2014.git
> git.exe init C:\Program Files (x86)\Jenkins\workspace\AdventureWorks2014 - 1. Build # timeout=10
Fetching upstream changes from https://github.com/h020905a/AdventureWorks2014.git
> git.exe --version # timeout=10
using GIT_ASKPASS to set credentials
> git.exe fetch --tags --progress https://github.com/h020905a/AdventureWorks2014.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Error performing git command
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1793)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1513)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:512)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1057)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097)
at hudson.scm.SCM.checkout(SCM.java:495)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1728)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Caused by: org.jvnet.winp.WinpException: Failed to read RT_USER_PROCESS_PARAMETERS error=299 at envvar-cmdline.cpp:151
at org.jvnet.winp.Native.getCmdLineAndEnvVars(Native Method)
at org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:126)
at org.jvnet.winp.WinProcess.getCommandLine(WinProcess.java:102)
at hudson.util.ProcessTree$Windows$1.getArguments(ProcessTree.java:444)
at hudson.plugins.msbuild.MsBuildKillingVeto.vetoProcessKilling(MsBuildKillingVeto.java:56)
at hudson.util.ProcessTree$OSProcess.getVeto(ProcessTree.java:242)
at hudson.util.ProcessTree$Windows$1.killRecursively(ProcessTree.java:425)
at hudson.util.ProcessTree.killAll(ProcessTree.java:145)
at hudson.Proc$LocalProc.destroy(Proc.java:380)
at hudson.Proc$LocalProc.join(Proc.java:353)
at hudson.Proc.joinWithTimeout(Proc.java:166)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1780)
... 15 more
ERROR: null
Finished: FAILURE
If your github login password has special characters, then the issue you are facing might be similar to the issue described in this ticket:
https://issues.jenkins-ci.org/browse/JENKINS-38655
You can try getting your job to use JGit. Quoting from Mark Waite's answer in the above mentioned ticket:
"If you're not using TFS, but have special characters in the password of the specific user (like caret or ampersand or single quote or double quote), then this may be a duplicate of JENKINS-38194. The work around in that case may be to switch that job from using the command line git implementation to use the JGit implementation. The JGit implementation needs to be enabled globally first from "Manage Jenkins", "Global Tool Configuration", "Git", then there will be a pick list in each job which will allow you to choose whether that job should use command line git or JGit."
Resolved the issue by switching the branch in github to master and making the repo public.

hudson.plugins.git.GitException: Could not fetch from any repository

I want to configure hudson+git and want to create a build. But I am getting following exception:
Started by user nitish
Checkout:workspace / /root/.hudson/jobs/NightlyGit/workspace - hudson.remoting.LocalChannel#dd7efd
Using strategy: Default
Checkout:workspace / /root/.hudson/jobs/NightlyGit/workspace - hudson.remoting.LocalChannel#dd7efd
Fetching changes from the remote Git repository
Fetching upstream changes from https://github.com/test/eng.git
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
ERROR: (Underlying report) : Error performing command: /usr/bin/git fetch -t https://github.com/test/eng.git +refs/heads/nightly:refs/remotes/origin/nightly
Command "/usr/bin/git fetch -t https://github.com/test/engile.git +refs/heads/nightly:refs/remotes/origin/nightly" returned status code 128: error: The requested URL returned error: 401 while accessing https://github.com/test/eng.git/info/refs
fatal: HTTP request failed
ERROR: Could not fetch from any repository
FATAL: Could not fetch from any repository
hudson.plugins.git.GitException: Could not fetch from any repository
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:887)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:845)
at hudson.FilePath.act(FilePath.java:758)
at hudson.FilePath.act(FilePath.java:740)
at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:845)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:622)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1483)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:507)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:424)
at hudson.model.Run.run(Run.java:1366)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)
I am newbie to the git ,I dont know what is the exact problem is there any creadentials required while using git with hudson?. Right now I have created the hudson job and providing the git repository link but it throws above exception. can somebody help me to sort out this issue.
Try this:
Go to the job's "Configure" page.
Under Source Code Management → Git → Additional Behaviors, add a behavior "Wipe out repository & force clone":
Click on Save button.
Try to Build again.
I have created the SSH key on hudson server and added it to my github account that solved my issue.
Sometimes the permission of the workspace also can cause the same error.
sudo chown -R jenkins: <workspace>

Jenkins pulling source code from GitHub private repo

I'm trying to set Jenkins up for my project in my server.
I uploaded my build script in GitHub private repo. I've established a SSH key, and deployed it through GitHub.
But when I try to build, Jenkins fails to pull successfully from my private repo
here is the console output:
Started by user anonymous
Building in workspace /Users/Shared/Jenkins/Home/jobs/moai-test/workspace
Checkout:workspace / /Users/Shared/Jenkins/Home/jobs/moai-test/workspace - hudson.remoting.LocalChannel#15e6e48b
Using strategy: Default
Fetching changes from 1 remote Git repository
Fetching upstream changes from https://github.com/****/****.git
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
hudson.plugins.git.GitException: Error performing command: git fetch -t https://github.com/****/****.git +refs/heads/*:refs/remotes/origin/*
at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:862)
at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:817)
at hudson.plugins.git.GitAPI.fetch(GitAPI.java:197)
at hudson.plugins.git.GitAPI.fetch(GitAPI.java:1063)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:812)
at hudson.plugins.git.GitSCM.access$100(GitSCM.java:90)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1096)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1064)
at hudson.FilePath.act(FilePath.java:842)
at hudson.FilePath.act(FilePath.java:824)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1064)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1256)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494)
at hudson.model.Run.execute(Run.java:1502)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)
Caused by: java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:485)
at java.lang.UNIXProcess.waitFor(UNIXProcess.java:115)
at hudson.Proc$LocalProc.join(Proc.java:319)
at hudson.Launcher$ProcStarter.join(Launcher.java:345)
at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:843)
... 18 more
ERROR: Could not fetch from any repository
FATAL: Could not fetch from any repository
hudson.plugins.git.GitException: Could not fetch from any repository
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1103)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1064)
at hudson.FilePath.act(FilePath.java:842)
at hudson.FilePath.act(FilePath.java:824)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1064)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1256)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494)
at hudson.model.Run.execute(Run.java:1502)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)
Looking at your build log
Using strategy: Default
Fetching changes from 1 remote Git repository
Fetching upstream changes from https://github.com/****/****.git
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
You are using the HTTPS URI for the github repo.
The HTTPS URI uses username/password to authenticate and not the SSH key.
To use the SSH key you need to checkout the SSH URI instead, e.g.
git#github.com:****/****.git
And that should fix your issue.
Alternatively you could give Jenkins the username/password (though that is a bigger security risk)

how to add a second application to github?

I successfully created my first repository (first_app) from my local machine and pushed the copy of master to github (Account/user shown as xyz).
Now I am trying to add a second application and push it out. But I keep getting errors. Here is the log of commands run to create the second application and the messages received:
~/rails_projects/dem3>sudo git remote add origin git#github.com:xyz/dem3
~/rails_projects/dem3>git push
ERROR: xyz/dem3.git doesn't exist. Did you enter it correctly?
fatal: The remote end hung up unexpectedly
~/rails_projects/dem3>
As you can see the "remote add" command goes through without issues. I see the following entries in dem3/.git/config:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
url = git#github.com:xyz/dem3
fetch = +refs/heads/*:refs/remotes/origin/*
Thoughts?
Thanks,
Tabrez
Did you create a repository for your second application on github.com (through web-interface)?