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.
Related
Pardon my ignorance here.
I have a local Windows machine using which if I run the following commands on a Windows cmd prompt, they all work:
git config --global user.email "myuser#abc.com"
git config --global user.name "myuser"
cd Try (some dir holding a single readme file)
git init
git add .
git commit -am "initial"
git remote add origin git#mygiturl.git (URL where I want to check into)
git remote -v
git push -u origin --all
However, if I try running the exact same set of commands from a Linux server (EC2 instance spawned in AWS), it throws:
ubuntu#ip:~/try$ git push -u origin --all
GitLab: The project you were looking for could not be found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I'm guessing it's possible got to do with ssh and/or authentication, but it doesn't error out with "permission denied".
If I run these same from Ubuntu Linux subsystem on Windows, the "git push -u origin --all" fails with permission denied instead.
git#gitlab....: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Any inputs are appreciated.
GitLab: The project you were looking for could not be found. fatal:
Could not read from remote repository. Please make sure you have the
correct access rights and the repository exists.
Most likely cause to this is that your Amazon EC2 instance does not have any connectivity to the internet. This maybe be because it is in the private subnet or you have some security group rules to block the outgoing connection. If your instance is in private subnet then you may need to associate a NAT gateway and add a route table entry to allow the ec2 instance reach to the internet.
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.
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 .
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
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.