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.
Related
When I try to tag a specific build through Jenkins, I get the following error:
ERROR: Error tagging repo 'refs/remotes/origin/master' :
org.eclipse.jgit.api.errors.NoHeadException: Tag on repository without
HEAD currently not supported hudson.plugins.git.GitException:
org.eclipse.jgit.api.errors.NoHeadException: Tag on repository without
HEAD currently not supported at
org.jenkinsci.plugins.gitclient.JGitAPIImpl.tag(JGitAPIImpl.java:509)
at
hudson.plugins.git.GitTagAction$TagWorkerThread.perform(GitTagAction.java:199)
at hudson.model.TaskThread.run(TaskThread.java:129) Caused by:
org.eclipse.jgit.api.errors.NoHeadException: Tag on repository without
HEAD currently not supported at
org.eclipse.jgit.api.TagCommand.call(TagCommand.java:137) at
org.jenkinsci.plugins.gitclient.JGitAPIImpl.tag(JGitAPIImpl.java:507)
... 2 more Trying next branch Completed
When trying to tag in the workspace it works fine, HEAD is in fact attached, git refs look fine, could this be an issue that when Jenkins is trying to tag it is looking in the wrong working directory?
Is there a way to pull more verbose logs with how it's trying to tag?
FYI - using the Jenkins 2.81, and swarm Linux agents, latest Git plugin.
Consider the actual code throwing the exception:
try (RevWalk revWalk = new RevWalk(repo)) {
// if no id is set, we should attempt to use HEAD
if (id == null) {
ObjectId objectId = repo.resolve(Constants.HEAD + "^{commit}"); //$NON-NLS-1$
if (objectId == null)
throw new NoHeadException(
JGitText.get().tagOnRepoWithoutHEADCurrentlyNotSupported);
Double-check your configuration: see "Jenkins Git plugin detached HEAD". You need to make sure Jenkins actually does checkout a branch.
Try for instance to add a simple test step with a git status in it, to validate that.
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.
2015-08-14 19:13:13.3920|WARN|thread: 1|StandardUserErrors|Showing user error Failed to get list of branches.
LibGit2Sharp.InvalidSpecificationException: 'https://github.com/gouravwalia1990/TMM' is not a valid remote name.
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)
at LibGit2Sharp.Core.Proxy.git_branch_upstream_name(RepositorySafeHandle handle, String canonicalReferenceName)
at LibGit2Sharp.Branch.ResolveTrackedBranch()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at LibGit2Sharp.Branch.get_TrackedBranch()
at GitHub.ConcurrentRepositoryConnection.<GetBranches>b__16(Branch x)
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Linq.Enumerable.<ExceptIterator>d__99`1.MoveNext()
at System.Linq.Enumerable.<ConcatIterator>d__71`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at GitHub.ConcurrentRepositoryConnection.<GetBranches>b__13()
at System.Reactive.Linq.ObservableImpl.Defer`1.Eval()
at System.Reactive.Linq.ObservableImpl.Defer`1._.Run()
2015-08-14 19:12:03.6625|INFO|thread: 1|CommandLineHandler|Parsing command line arguments:C:\Users\gopal\AppData\Local\Apps\2.0\ZQWGNE9R.3YE\60LC4KXB.QK2\gith..tion_317444273a93ac29_0002.000e_114545a4195e25d4\GitHub.exe
2015-08-14 19:12:03.7836|INFO|thread: 1|AppInstanceCommunicator|Starting up as master instance of GitHub for Windows
2015-08-14 19:12:04.1709|INFO|thread: 5|StartupLogging|
The error is pretty explicit, you are not providing a valid repository name.
LibGit2Sharp.InvalidSpecificationException: 'https://github.com/gouravwalia1990/TMM' is not a valid remote name.
It looks like you're not using the correct url to the repo, but the url to the repo's webpage.
You can find the repo url on the webpage: https://github.com/gouravwalia1990/TMM.
HTTPS clone URL : https://github.com/gouravwalia1990/TMM.git
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
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>