Tuleap - SVN checkout issue : error 500 - tuleap

I'm using the docker image of tuleap in version 8.3.
I setup an AD in /etc/tuleap/plugins/ldap/etc/ldap.inc and enable it in /etc/tuleap/conf/local.inc with
$sys_auth_type = 'ldap';
I then created a subversion project and add my user with the Add user button in using the autocompletion ==> my user get recognized, it was never added to tuleap before, so I think the connection with the AD is working.
But when I do a
svn list --username myuser http://tuleap/svnroot/toto, I get :
Redirecting to URL 'https://tuleap/svnroot/toto':
Authentication realm: <https://tuleap:443> LDAP Subversion Authorization (toto)
Password for 'myuser':
svn: E175002: Unable to connect to a repository at URL 'https://tuleap/svnroot/toto'
svn: E175002: Server sent unexpected return value (500 Internal Server Error) in response to OPTIONS request for 'https://tuleap/svnroot/toto'
I can't find any error in /var/log/httpd/error_log
Any ideas ?

Please make sure that you have appropriate access to checkout the code from repo. If you have access and getting error 500 then please navigate to %appdata%\subversion\auth\svn.simple in Windows
In linux run this command -
rm -f~/.subersion/auth/svn.simple/*
Let us know if this helps you .

Related

Not able to access git repo from jenkins

I have configured Jenkins on a Linux machine and my git repo is on an another Linux server. But when I try to give the URL of the repo to Jenkins I get the following error.
Failed to connect to repository : Command "git -c core.askpass=true ls-remote -h ssh://user#ip/~/export1 HEAD" returned status code 128:
stdout:
stderr: Permission denied, please try again.
Permission denied, please try again.
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.
What could be the cause for this?
I have seen that both the systems' rsa key is present in each other's .ssh/known_hosts folder.
I am able to pull or clone code from the repo to a folder in Jenkins system as well. So why is Jenkins not able to take it?
I have also tried the URL user#ip:/fullpath/to/repo
You need to make sure Jenkins is running as the right user (the one who has the keys in ~/.ssh/id_rsa(.pub)
That user might not be the same as the one used in the ssh url: user#ip means you are connecting to ip using an account which has your public key in ~user/.ssh/authorized_key.
So the Jenkins process must be run by an account which has the private and public key, whose public key is in ~user/.ssh/authorized_key on the git server side.
And that account should have done (only once) an ssh-keyscan -H ip >> ~account/.ssh/known_hosts before any ssh attempt, in order to record the git server ip as a known host.
Does it being a bare repo make any difference or change in the URL?
No. The .git at the end of the bare repo folder is optional when used as an url.
Further to #VonC's reply, you can also use the Credentials plugin to define a set of credentials on your Jenkins master that your Jenkins job uses to access your Git repo. This allows you to run Jenkins itself as a different user from there one that has access to the Git repo.
The main problem was the security of the systems. I hadnt checked the authentication mechanisms on my server. The password authentication to the git server was causing the problem because the jenkins machine tries to directly fire a ls-remote to the path. When you do the same thing on the terminal you will be prompted for a password and then itl accept. When I set the password authentication and UsePAM to no and enabled the RSA authentication, pubkey authentication and authorised key setting to yes in the sshd_config file, and restarted, it was able to access the repo and I dint get this error.

http 401.1 error while performing a GIT clone from a Linux server

I'm running TFS 2013 with a GIT team project. When I perform a git clonefrom one of the local Windows servers I don't have any issues:
-bash-4.1$ git clone "http://tfsadm:tfspas#tfs.server.com:8080/tfs/DefaultCollection/_git/Main"
Initialized empty Git repository in /home/tfsadm/Mainframe/.git/
but when I perform a git clone from Linux, I get the following error:
error: The requested URL returned error: 401 while accessing http://tfsadm:tfspas#tfs.server.com:8080/tfs/DefaultCollection/_git/Mainframe/info/refs fatal: HTTP request failed
Error: The requested URL returned error: 401 while accessing https://github.com/Joey-myproject/repo.git/info/refs fatal: HTTP request failed
is an often reoccuring error.
One of the reasons of this happening is because the client is not authorized to access to that resource.
A general solution is to check for the following:
Do you have a stable git version?
Is the remote correct configured?
If 2FA is enabled, if so provide an access token.
Double check your permissions(username/password in configs) perhaps also try to use the format ' https://username#mydomain.org/project.git''
Try ssh instead of https
I am not sure, but have you already seen this link Can't clone a github repo on Linux via HTTPS?
It can give some extra information.

git-svn rejected Basic challenge now that VPN is required

I have been using git-svn for a few months now as an interface to the SVN repository for my company.
However, about a week ago my company changed their policy such that SVN is only reachable if connected by way of Cisco VPN.
I have no trouble connecting to VPN on my Linux Mint VM (which is where I do my coding), but I am now no longer able to pass authentication when I, for example, run git svn dcommit to checkin code changes.
I have tried:
rm -rf ~/.subversion, to get rid of any saved SVN authentication credentials and force it to take new ones, but this seems to have no effect, nor does it ever prompt me for fresh credentials, surprisingly.
starting in a freshly created directory and running git svn clone to initiate a new link to the SVN repository, but with the same authentication failures.
Here is what I see when running git svn dcommit or git svn clone:
$ git svn dcommit
Committing to https://<redacted>:2443/svn/LS/branches/PRODUCTION-SUPPORT-1/ls-policygen ...
WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-wCQwzG/pkcs11: No such file or directory
Authorization failed: OPTIONS of 'https://<redacted>:2443/svn/LS/branches/PRODUCTION-SUPPORT-1/ls-policygen': authorization failed: Could not authenticate to server: ignored NTLM challenge, rejected Basic challenge (https://<redacted>:2443) at /usr/local/libexec/git-core/git-svn line 943
The gnome-keyring warning has always been present, and never stopped commits before VPN was required.
take a look at this snipped from your error code:
Authorization failed: OPTIONS of 'https://<redacted>:2443/svn/LS/branches/PRODUCTION-SUPPORT-1/ls-policygen': authorization failed: Could not authenticate to server: ignored NTLM challenge, rejected Basic challenge (https://<redacted>:2443) at /usr/local/libexec/git-core/git-svn line 943
specially at this part: Could not authenticate to server: ignored NTLM challenge
It looks like your company also changed autentication methods too.
Take a look at: Does git clone work through NTLM proxies?
I would take this steps:
connect to your repository within your browser
try to connect with another user account - probably you have some cache files in your home directory
configure git or even svn according to NTLM auth
Good Luck,
LEslie

Apache SVN, error 500 on arch linux

I used https://wiki.archlinux.org/index.php/Subversion_Setup guide to install my svn repository, still, I'm not able to get to my repository. Here's the output of svn co:
[ots#localhost test]$ svn co https://192.168.0.21/svn/otclient_modules --username kosto
Authentication realm: <https://192.168.0.21:443> SVN Repositories
Password for 'kosto': //no matter if i enter good or wrong
svn: E175002: Unable to connect to a repository at URL 'https://192.168.0.21/svn/otclient_modules'
svn: E175002: Server sent unexpected return value (500 Internal Server Error) in response to OPTIONS request for 'https://192.168.0.21/svn/otclient_modules'
thanks in advance
The problem was in permissions. chgrp www-data on svn config files (policy files), and directory that contains them.

SVN client checkout errors

I have a situation where I can checkout a repo through tortoise or Eclipse and a browser, but for the life of me cannot do it directly from the cygwin/ Linux command lines. These are the errors :
svn: E175002: Unable to connect to a repository at URL 'https://BLAH/project/trunk'
svn: E175002: OPTIONS of 'https://BLAH/project/trunk': could not connect to server (https://BLAH)
The command I use is :
svn checkout --username MYUN --password MYPASS https://BLAH/project/trunk
I have set the proxy too. Any ideas would be appreciated.
Regards
Try setting the proxy in ~/.subversion/servers.
On my corporate laptop behind a proxy that requires NTLM authentication I have to run the ntlmaps proxy and set:
Suppose you define them globally, add this at the end of the file:
http-proxy-host = localhost
http-proxy-port = 5865
I've configured the ntlmaps daemon to prompt me for my password but you could also add it to ~/.subversion/servers.
http-proxy-username = your account
http-proxy-password = your password
You can get ntlmaps from from http://ntlmaps.sourceforge.net/, extract it locally then edit ntlmaps-0.9.9\server.cfg
PARENT_PROXY:<server FQDN>
PARENT_PROXY_PORT:<proxy port>
NT_DOMAIN:<NT DOMAIN>
USER:<USERNAME>
PASSWORD:
Hope this helps.

Resources