Jenkins - bash command svn can not found - bash

I would like to check out tags from svn via Jenkins with bash command. But I get the error message svn command cannot be found, although I have written it clearly.
Here is what my line looks like:
svn checkout http://xxx-yyyyy.zzz.xx-www.com:8888/xxx/yyy/$QQQ_tag $DDD/aaa/ --username svc.xxxxx --password

Install the subversion package and retry. On linux:
sudo apt-get install subversion
On mac with Homebrew:
brew install subversion
When you've installed it, if bash still cannot find it, check out that you have added the svn executable path to your PATH environment variable and reopen the terminal.
Check out this answer for more details on setting PATH for Jenkins
Jenkins slave not able to find svn

Related

Problem installing git subrepo on MacOs bash 5

I was trying to install git subrepo on MacOs with bash 5.0.18 installed. When I source .bashrc, I get error message :
The git-subrepo command requires that 'Bash 4+' is installed. It
doesn't need to be your shell, but it must be in your PATH. You appear
to be on macOS. Try: 'brew install bash'. This will not change your
user shell, it just installs 'Bash 5.x'.
Is git subrepo not compatible with bash 5 or is there any solution to make it work?
https://github.com/ingydotnet/git-subrepo
apparently, I can install it using brew with less hassle:
brew install git-subrepo
It should be a PATH issue, as illustrated by ingydotnet/git-subrepo issue 463
I realized there was a part of my path not being specified which caused this issue.

How to install patchutils on Windows 10

I already have Git and Git Bash installed. I find it inconvenient to create an "interdiff" between two patch files in Git Bash using only git commands. I would like to install patchutils, so that I can use the interdiff command -- and thus create interdiffs using the patch files directly, without committing code first.
How do I install patchutils such that I can use it from Git Bash? I tried npm install patchutils, but no success.
Another approach to this issue would be to use MSYS2 instead of "Git Bash".
MSYS2 has its own Git package, and it has a PatchUtils package:
https://packages.msys2.org/base/patchutils

How to install go-sql-driver on Windows

I am trying to install go-sql-driver on Windows Vista but I am having problems with GOPATH.
I installed git as suggested and added GOPATH as a new user environment in Windows with path C:/users/A/desktop/go.
I ran go get github.com/go-sql-driver/mysql in the command line but it gives me this error:
C:\>go get github.com/go-sql-driver/mysql
go: missing Git command. See http://golang.org/s/gogetcmd
package github.com/go-sql-driver/mysql: exec: "git": executable file not found in %PATH%
When I go look at http://golang.org/s/gogetcmd it merely says download git. But it is already downloaded in my machine.
I also went ahead and created a new environement variable for PATH and set its path to the directory where git was installed but that did not help either.
What am I doing wrong?
Download the Windows version of Git from http://git-scm.com/downloads.
Run the downloaded executable file, currently Git-1.8.3-preview20130601.exe, which will start a Git Setup wizard to install Git.
Check Git Setup Options
Run Git from the Windows Command Prompt
Checkout as-is, commit Unix-style line endings
Check the installation by running:
C:\>git --version
git version 1.8.3.msysgit.0
Make sure Git is in the %PATH% environment variable and ensure Git is installed. If you cannot run git --version in the command prompt, then the Git binary directory isn't listed in your %PATH%. Fix this by adding Git to the path, close the command prompt, and run git --version in a new command prompt. If you're still having issues, then you might be having other problems.
Install the GIT BASH desktop app in your Windows PC. The download link is here. Once installed, open the shell and type:
go get -u github.com/go-sql-driver/mysql
This will install driver for Golang's MySQL database package

The git user is unable to execute bundle during GitLab installation

I am trying to install GitLab on a Debian Wheezy and experiencing an issue I don't understand.
Following the install guide for version 5.0:
step 1: was run as explained
step 2: I used rvm (multi-user install) instead (ruby-1.9.3-p392)
steps 3 to 5: were run as explained (MySQL chosen)
step 6: everything works fine until the "Install Gems" section, where I get the following error:
/home/git/gitlab$ sudo -u git -H bundle install --deployment --without development test postgres
sudo: unable to execute /usr/local/bin/bundle: No such file or directory
I run this as my normal user (in the sudo and rvm groups), and the git user is not a sudoer.
I think that the line sudo gem install bundler, in step 2, does not grant the git user to execute bundle properly, but I don't know how to fix this.
I probably did something wrong but cannot figure out what it is, as I tried to respect the standard instructions as close as possible.
Any clue about this? Thanks, I am losing hope...
For information, I have written to the GitLab mailing-list about this problem but did not get any answer. Moreover, last time I asked something similar on ServerFault, I have been advised to post on StackOverflow instead... hence this question :)
When I do $ which bundle, I get /usr/local/rvm/gems/ruby-1.9.3-p392/bin/bundle.
The git user has been created with the --disabled-login flag and thus I cannot login as git to run bundle.
When I do $ sudo -u git bundle, I get
sudo: unable to execute /usr/local/bin/bundle: No such file or directory
That means git user has not /usr/local/rvm/gems/ruby-1.9.3-p392/bin in its PATH, and you cannot modify its .profile or .bashrc because of the --disabled-login flag.
It seems that running sudo -i -u git bundle instead of sudo -u git bundle does the trick
That is the safest route, and will execute the command as git, but will simulate first an initial login, using the PATH defined in .profile and .bashrc of user root.
See "How does sudo search the path for executable?" for more.
On my local machine after upgrade from 6.4 to 7.7 I had such issue.
The compilation of ruby was made under root account.
So need permissions to read compiled ruby and installed bundle.
chmod ugo+rx /usr/local/bin/bundle
chmod -R ugo+rX /usr/local/lib/ruby/
In production mode You could be more strict.

Error when trying to use svn2git on Windows

I am trying to import a svn repository into git on Windows 7. I have Ruby/Gems/svn2git installed, but when I run this command:
svn2git http://svn.server/path
I get the following error:
C:/Ruby192/lib/ruby/gems/1.9.1/gems/svn2git-2.0.0/lib/svn2git/migration.rb:226:i
n `popen': No such file or directory - git svn init --no-metadata --trunk=trunk
--tags=tags --branches=branches http://svn.server/path (Errno::ENO
ENT)
I don't know what this error means. All files are in the correct place as far as I can tell, and copying the repository to my local system doesn't work. Any help is appreciated. Thanks!
EDIT: My SVN repository has the default trunk/branch structure.
Svn2Git documentation states that depends on git-core (msysgit in windows) and git-svn, since the error is related to the "git svn" command, i guess you'll have to install it and make it available in your PATH.
Check this other StackOverflow question on how to install both git-core and git-svn.

Resources