WARNING: Can't exec "git": No such file or directory at /home/git/bin/lib/Gitolite/Common.pm line 152 - gitolite

git clone git#127.0.0.1:gitolite-admin.git
Cloning into 'gitolite-admin'...
WARNING: Can't exec "git": No such file or directory at /home/git/bin/lib/Gitolite/Common.pm line 152, <DATA> line 1.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

This comes from sitaramc/gitolite/src/lib/Gitolite/Common.pm, and can be seen for instance in this issue.
You need to check the PATH, with the Git installation folder in it: /path/to/Git/bin.

Related

Error with Command Line Script in Azure DevOps Pipeline

I'm building my first pipeline using Power Platform Build Tools. I'm trying to export a Dynamics model driven app to a repo. I'm getting an error with in my Command Line Script. The following is the error log:
2021-01-21T08:48:04.6191345Z ##[section]Starting: Command Line Script
2021-01-21T08:48:04.6292483Z
==============================================================================
2021-01-21T08:48:04.6292831Z Task : Command line
2021-01-21T08:48:04.6293131Z Description : Run a command line script using Bash on Linux and macOS
and cmd.exe on Windows
2021-01-21T08:48:04.6293422Z Version : 2.178.0
2021-01-21T08:48:04.6293630Z Author : Microsoft Corporation
2021-01-21T08:48:04.6293952Z Help :
https://learn.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2021-01-21T08:48:04.6294293Z
==============================================================================
2021-01-21T08:48:05.7216764Z error: pathspec 'master' did not match any file(s) known to git
2021-01-21T08:48:05.7217182Z Generating script.
2021-01-21T08:48:05.7217463Z ========================== Starting Command Output
===========================
2021-01-21T08:48:05.7217952Z ##[command]"C:\windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL
"D:\a\_temp\93c0ac5e-da28-4265-b4d0-4326b5f38209.cmd""
2021-01-21T08:48:05.7218457Z commit all changes
2021-01-21T08:48:05.7218642Z push code to new repo
2021-01-21T08:48:05.7226781Z fatal: pathspec '-' did not match any files
2021-01-21T08:48:05.7227220Z error: pathspec 'export"' did not match any file(s) known to git
2021-01-21T08:48:06.2395991Z git: 'bearer' is not a git command. See 'git --help'.
2021-01-21T08:48:06.2983259Z ##[error]Cmd.exe exited with code '1'.
2021-01-21T08:48:06.3323471Z ##[section]Finishing: Command Line Script
Based on this output, I don't know what is missing.
According to your screenshots, your default branch is "main", not "master".
The master did not match any branches known to git, so the task failed.
In addition, you need to use origin/{branch} instead of {branch}. As the branch is a remote branch.
Error with Command Line Script in Azure DevOps Pipeline
This may be because your git command has wrong syntax.
According to the image you provided, we could to know the git command line you used is:
This is not the correct syntax to add all files, that also the reason why you get the error:
fatal: pathspec '-' did not match any files
If I use the same syntax git add —— all, I will get the same error message.
To resolve this error, please try to use following correct syntax:
git add --all
Besides, we could not use the AUTHORIZATION:BEARER with $(system.AccessToken), you need to use Authorization: Basic with Base64-encode:
Please check this thread for some more details.
That the reason why you get the error git: 'bearer' is not a git command..
To resolve this issue, you could use git command line with PAT directly to push the files:
git push https://<Your PAT>#dev.azure.com/<YourOrganization>/<YourProject>/_git/MyTestProject HEAD:master
In addition, what Jane said is another issue.

Copy files task is not copying to Azure repos

I have a inventory.txt in one folder of my azure repos. I need to copy that to another folder. I have used "Copy File task" but it copying file to the required folder only in agent machine.Its not reflecting in azure repos. What Can I do.
My Main Task is to give a packages_list variable in a inventory file. But this variable is being used by two yaml files which are two different folders and used for two different pipeline. For that I have declared a packages_list variable in one of the folder and copy to another folder. ANy other alternativeees are much appreciated.
After copy the files to target folder, you need run git command to push changes to sync the changed folder back into Azure devops repo.
Please try with below steps to configure your pipeline:
(1) The first Command line task:
git config --global user.email "xxx#xx.com"
git config --global user.name "Merlin"
cd $(Build.SourcesDirectory)
git init
(2) In second task, execute the Copy file task.
(3) In next Command line task, do git push to push the changes:
git add .
git commit -m "File copied"
git remote rm origin
git remote add origin https://xxx#dev.azure.com/xxx/xxx/_git/xxxx
git push -u origin HEAD:master
Since above command is modifying Azure repos, please enable Allow scripts to access the OAuth token in agent job and ensure the corresponding Build service account has Contribute permission to Git repos. Just follow this doc to configure the permission setting.

Jenkins transfering 0 files via publishing over SSH

I have read these 4 posts already:
Jenkins transferring 0 files using publish over SSH plugin
transferring 0 files using publish over SSH plugin in Jenkins
Jenkins, SSH plugin, 0 files transferred
Jenkins 0 files published after build
Our issue seems to have the most in commong with the first issue in that list.
We are transitioning from building our software (and the packages we need) from Windows to Linux. Setting up the linux build did work, however, the resulting archive is not transfered to our package server. Relevant console output:
SSH: Connecting from host [intern2]
SSH: Connecting with configuration [intern2] ...
SSH: EXEC: STDOUT/STDERR from command [conda index /srv/pkgsrv/conda-repo/linux-64/] ...
updating index in: /srv/pkgsrv/conda-repo/linux-64
SSH: EXEC: completed after 1,001 ms
SSH: Disconnecting configuration [intern2] ...
SSH: Transferred 0 file(s)
Finished: SUCCESS
The build config is:
Source files: conda-bld/linux-64/*.tar.bz2
Remove prefix: conda-bld/linux-64
Remote directory: conda-repo/linux-64/
Execute command: conda index /srv/pkgsrv/conda-repo/linux-64/
The remote directory already exists and jenkins has rights to write there. The same server configuration (apart from subdirs) is used for the windows builds and they are transfered correctly.
The Jenkins configuration says:
HOME /var/lib/jenkins
JENKINS_HOME /var/lib/jenkins
PWD /var/lib/jenkins
The directory we are building into is $HOME/conda-bld/linux-64. In there I can see the built .tar.bz2 files (a few successful builds already accumulated).
jenkins#intern2:~/conda-bld/linux-64$ ls
fonts-1-1.tar.bz2 qjsonrpc-dev-1.0-12.tar.bz2 qjsonrpc-dev-1.0-6.tar.bz2 qjsonrpc-dev-1.0-9.tar.bz2
<otherproject>-0.1-19_g6fe33e2.tar.bz2 qjsonrpc-dev-1.0-13.tar.bz2 qjsonrpc-dev-1.0-7.tar.bz2 repodata.json
qjsonrpc-dev-1.0-10.tar.bz2 qjsonrpc-dev-1.0-14.tar.bz2 qjsonrpc-dev-1.0-8.tar.bz2 repodata.json.bz2
Why isn't jenkins giving some kind of error if it doesn't copy? Is something wrong with how I specified the folders, because I can't figure out what? Where can I look for errors?
/edit: I looked at the Jenkins log and found
Dec 22, 2016 8:39:41 AM org.kohsuke.stapler.RequestImpl$TypePair convertJSON
WARNING: 'stapler-class' is deprecated: hudson.plugins.git.extensions.impl.RelativeTargetDirectory
Dec 22, 2016 8:39:41 AM org.kohsuke.stapler.RequestImpl$TypePair convertJSON
WARNING: 'stapler-class' is deprecated: hudson.tasks.Shell
Dec 22, 2016 8:39:41 AM org.kohsuke.stapler.RequestImpl$TypePair convertJSON
WARNING: 'stapler-class' is deprecated: jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin
Dec 22, 2016 8:40:15 AM hudson.model.Run execute
INFO: qjsonrpc-linux #15 main build action completed: SUCCESS
I'll try updating the SSH Publish plugins and look if that helps.
The issue was that the files were built to different folders than the jenkins working directory because I forgot to set CONDA_BLD_PATH. However, when setting CONDA_BLD_PATH we ran into strange errors during building of the package.
Making absolute symlink root/lib64/libqjsonrpc.so.1.0 -> libqjsonrpc.so.1.0.99 relative
Traceback (most recent call last):
File "/usr/local/lib/miniconda/bin/conda-build", line 6, in <module>
sys.exit(conda_build.cli.main_build.main())
File "/usr/local/lib/miniconda/lib/python2.7/site-packages/conda_build/cli/main_build.py", line 242, in main
execute(sys.argv[1:])
File "/usr/local/lib/miniconda/lib/python2.7/site-packages/conda_build/cli/main_build.py", line 234, in execute
already_built=None, config=config)
File "/usr/local/lib/miniconda/lib/python2.7/site-packages/conda_build/api.py", line 77, in build
need_source_download=need_source_download, config=config)
File "/usr/local/lib/miniconda/lib/python2.7/site-packages/conda_build/build.py", line 1099, in build_tree
config=recipe_config)
File "/usr/local/lib/miniconda/lib/python2.7/site-packages/conda_build/build.py", line 799, in build
create_info_files(m, pkg_files, config=config, prefix=config.build_prefix)
File "/usr/local/lib/miniconda/lib/python2.7/site-packages/conda_build/build.py", line 399, in create_info_files
write_about_json(m, config)
File "/usr/local/lib/miniconda/lib/python2.7/site-packages/conda_build/build.py", line 305, in write_about_json
conda_info = subprocess.check_output([bin_path, 'info', '--json', '-s'])
File "/usr/local/lib/miniconda/lib/python2.7/subprocess.py", line 574, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/usr/local/lib/miniconda/bin/conda', 'info', '--json', '-s']' returned non-zero exit status 1
Build step 'Execute shell' marked build as failure
We ultimately went with building to the wrong directories and then moving the files before they were published in the post build step.
mkdir -p conda-bld/linux-64
conda build src
then
mv /var/lib/jenkins/conda-bld/linux-64/qjsonrpc*.tar.bz2 conda-bld/linux-64
Not sure what is wrong with the build when setting the conda path, but it works now.

Switching the update channel on Firefox Flame fails

I tried to follow the steps to change the update channel described here: Switch to nightly update channel. But the phone won't reboot after executing change_channel.sh because the scripts fails with
$ ./change_channel.sh -v aurora
adbd is already running as root
remount succeeded
cannot stat '/tmp/channel-prefs/updates.js': No such file or directory
Currently I have B2G 21.0.0.0-prerelease installed from here.
I you open the script and read the line 57, there is
cat >$TMP_DIR/updates.js <<UPDATES
If it fails to create the file in that directory, he won't be able to push it when doing adb push:
$ADB push $TMP_DIR/updates.js $B2G_PREF_DIR/updates.js
So check your permissions or change the temp directory to let your script create the updates.js file,
TMP_DIR=/tmp/channel-prefs

how to build a subversion service?

I want to build a workspace with subversion, and I followed some tutorials;
Install subversion --OK
svnadmin create /var/svn/repos --OK
rebuild the conf file (delete "#" in passwd,authz,svnserve.conf).
sartup the server (svnserve -d -r /var/svn/repos) --have no return
import something (svn import /var/svn/import /var/svn/repos) --also no return
test the service (svn info svn://localhost/var/home/repos)
--
svn: warning: W160013: URL 'svn://localhost/var/svn/repos' non-existent in revision 1 svn: E200009: Could not list all targets
because some targets don't exist
Which step is wrong? Did I miss something important?
The path is wrong in step 6. svnserve interprets paths as local paths within the repository it is serving. Try this:
svn info svn://localhost/

Resources