yocto devtool change ":portnumber" to "/portnumber" in URI, how to fix it? - yocto

The command I executed:
devtool add --srcbranch master hello ssh://git#gitlab.xxxx.com.cn:22222/cjl/hello.git
but error shows:
ERROR: Fetcher failure: Fetch command export PATH="...omit"; export HOME="...omit"; git -c core.fsyncobjectfiles=0 ls-remote ssh://git#gitlab.xxxx.com.cn/22222/cjl/hello.git failed with exit code 128, output:
Permission denied, please try again.
Permission denied, please try again.
git#gitlab.ucas.com.cn: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
It resolves my URI to ssh://git#gitlab.xxxx.com.cn/22222/cjl/hello.git(:22222 to /22222)
I'm sure that:
git clone ssh://git#gitlab.xxxx.com.cn:22222/cjl/hello.git in bash is ok.
git://git#gitlab.xxxx.com.cn:22222/cjl/hello.git;protocol=ssh in other bbfile is ok.
so, why devtool change :port to /port?
yocto version: rocko 2.4

Related

Permission denied error while setting up GitHub Pages

I'm following this page https://learntocodewith.me/tutorials/github-pages/ to create GitHub pages on MacBook Air (El Capitan) but when I do the last step I get this error:
$ git remote add origin
https://github.com/azg357/azg357.github.io.git
$ GitHubPageTest a$ git push -u origin master
remote: Permission to azg357/azg357.github.io.git denied to zeynel1.
fatal: unable to access
'https://github.com/azg357/azg357.github.io.git/': The requested URL returned error: 403
$
It looks like permission to access the repository is denied to "zeynel1". I use names like "zeynel" or "zeynel1" because it is my first name, but in this case, I haven't used it! I don't know where this is coming from.
Just before this error, OSX asks permission to give permission to GitHub to access "osxkeychain". Is this related to this? The message says something like "git-credential-osxkeychain" cannot be verified.
This is the copy of the entire session:
as-MacBook-Air:azeynel a$ cd /Users/a/GitHubPageTest
as-MacBook-Air:GitHubPageTest a$ git init
Initialized empty Git repository in /Users/a/GitHubPageTest/.git/
as-MacBook-Air:GitHubPageTest a$ git add .
as-MacBook-Air:GitHubPageTest a$ git commit -m "first commit"
[master (root-commit) ad86580] first commit
1 file changed, 7 insertions(+)
create mode 100644 index.html
as-MacBook-Air:GitHubPageTest a$ git remote add origin
https://github.com/azg357/azg357.github.io.git
as-MacBook-Air:GitHubPageTest a$ git push -u origin master
remote: Permission to azg357/azg357.github.io.git denied to zeynel1.
fatal: unable to access
'https://github.com/azg357/azg357.github.io.git/': The requested URL returned error: 403
as-MacBook-Air:GitHubPageTest a$
Thanks!
.
This was a problem caused by the cache on Key chain app. I deleted the stored GitHub items and it worked.

RestBed clone failed from github

While cloning the restbed repo, we are getting below error and is taking a lot of time.
$ git submodule update --init --recursive
Submodule 'dependency/asio' (https://github.com/corvusoft/asio-dependency) registered for path 'dependency/asio'
Submodule 'dependency/catch' (https://github.com/corvusoft/catch-dependency) registered for path 'dependency/catch'
Submodule 'dependency/openssl' (https://github.com/corvusoft/openssl-dependency) registered for path 'dependency/openssl'
Cloning into '${HOME}/restbed/dependency/asio'...
error: RPC failed; curl 56 SSL read: errno -5961
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
fatal: clone of 'https://github.com/corvusoft/asio-dependency' into submodule path '${HOME}/restbed/dependency/asio' failed
Failed to clone 'dependency/asio'. Retry scheduled
Is there something wrong with the repo?
Thanks,
What occurs when you run git clone --recursive https://github.com/corvusoft/restbed.git

jenkins -github build issue

I have been facing issues while trying to build a project in jenkins which fetches the files from github .
Below is the error log i got :
p.s: for security reason i have removed the ssh url of git .I can able to clone from my locally but when im trying it from jenkins it fails . I have generated ssh key in linux server and its able to connect to github .Can anyone please help me on this
Building in workspace /var/lib/jenkins/jobs/tr-data-events-testing/workspace
> /usr/local/bin/git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> /usr/local/bin/git config remote.origin.url git#github.url---------git # timeout=10
Fetching upstream changes from git#github.url-----------s.git
> /usr/local/bin/git --version # timeout=10
using GIT_SSH to set credentials jenkins dxc key
> /usr/local/bin/git fetch --tags --progress git#----url--------------.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from git#---url-------.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:766)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1022)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1053)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1282)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
at hudson.model.Run.execute(Run.java:1741)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:381)
Caused by: hudson.plugins.git.GitException: Command "/usr/local/bin/git fetch --tags --progress git#github.-------events.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: error: The requested URL returned error: 503 while accessing https://--url-----------/info/refs
fatal: HTTP request failed
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1693)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1441)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:62)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:313)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:764)
... 11 more
ERROR: null
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
Finished: FAILURE
Help us localize this page
i resolved this issue by un setting the proxy in .gitconfig file . thank you for your answers
First, make sure Jenkins is running with the same user account you have created your ssh keys with.
It it does not, it would search for ~/.ssh/id_rsa in its own $HOME.
Second, to debug, you can launch Jenkins with this environment variable set first:
export GIT_SSH_COMMAND='ssh -Tv'
That way, any time it will try a git command involving ssh, you will see exactly where Jenkins/git tries to look for ssh keys, and what is the error.
Make sure you Git is recent enough to support this (Git 2.3+, Q4 2015).
But your logs show:
The requested URL returned error: 503 while accessing https://
So this has nothing to do with ssh. As mentioned, a proxy can interfere.

TeamCity is failing to checkout github repository

I'm having following errors from TeamCity when it updates working directory.
I'm using TeamCity 8.1.3 and checking out github repository on agent.
Looks like it happened all of a sudden. This was working yesterday.
I'm not sure how I can investigate this issue... Could someone help me?
[19:11:33]Checking for changes
[19:11:34]Failed to register agent parameters for: class jetbrains.buildServer.agent.impl.buildFiles.RecentlyFailedTestsFileWriter. Error: Permission denied
[19:11:34]Failed to register agent parameters for: class jetbrains.buildServer.agent.impl.buildFiles.ChangedFilesListFileWriter. Error: Permission denied
[19:11:34]Failed to register agent parameters for: class jetbrains.buildServer.agent.impl.buildFiles.RunnerParametersFileWriter. Error: Permission denied
[19:11:34]Failed to register agent parameters for: class jetbrains.buildServer.agent.impl.buildFiles.BuildParametersFileWriter. Error: Permission denied
[19:11:34]Failed to register agent parameters for: class jetbrains.buildServer.agent.impl.buildFiles.ConfigurationParametersFileWriter. Error: Permission denied
[19:11:34]Failed to publish build.start.properties.gz file. /Users/iosdevelopment/Documents/buildAgent/temp/agentTmp/build.start.properties.gz (Permission denied)
[19:11:34]Clearing temporary directory: /Users/iosdevelopment/Documents/buildAgent/temp/buildTmp
[19:11:34]Failed to delete empty directory: /Users/iosdevelopment/Documents/buildAgent/temp/buildTmp
[19:11:34]Checkout directory: /Users/iosdevelopment/Documents/buildAgent/work/ios_build_dir
[19:11:34]Updating sources: agent side checkout
[19:11:34][Updating sources] Will perform clean checkout. Reason: Checkout directory is empty or doesn't exist
[19:11:34][Updating sources] Cleaning /Users/iosdevelopment/Documents/buildAgent/work/ios_build_dir
[19:11:34][Updating sources] Using vcs information from server. Reason: no revision information for buildtype iPhone_CI and checkout directory /Users/iosdevelopment/Documents/buildAgent/work/ios_build_dir on agent
[19:11:34][Updating sources] VCS Root: git#github.com:taichino/iOS.git
[19:11:34][Updating sources] Failed to perform checkout on agent: Permission denied
[19:11:34]Publishing artifacts
[19:11:34]Failed to generate coverage report, error: java.io.FileNotFoundException: /Users/iosdevelopment/Documents/buildAgent/work/ios_build_dir/coverage.ic file does not exist
[19:11:34]Failed to publish build.finish.properties.gz file. /Users/iosdevelopment/Documents/buildAgent/temp/agentTmp/build.finish.properties.gz (Permission denied)
[19:11:34]Build failed to start. Artifacts will not be published for this build
I meet this similar issue, it is because of permission restriction.
I chmod -R 777 for the entire Teamcity installation, it works.
Hope it helps.
It might because you run teamcity agent under root (or other users) before, chmod -R 777 should solve the problem, but before that, you can do a "ll" on your agent's install dir, especially the ~/yourAgent/temp folder, make sure it is not owned by root.
I switched to check out on the server, ran the build and once it finished successfully I switched back to checkout on the agent, and it worked!

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>