Set username for repository when using SVK? - svk

I want to mirror a Subversion repository to a local folder using
svk mirror
But how can I specifify the username that shall be used for logging in to the repository? I already tried http://user#domain.tld/trunk but that's not working. The SVK help on the mirror parameter also didn't give any hint. Any idea? Thank you!

I've had the same problem a few days ago, and today I have finally found an answer (workaround). You need to connect to repository of internet using, for example, TortoiseSVN, it will ask you for proper credentials and store them along with SSL certificate. After that you can try to set mirror using SVK - it will use previously stored credentials and SSL certificate information. For me it worked just fine!
P.S. To remove stored SSL certificates you may refer [user]\AppData\Roaming\Subversion\auth\svn.ssl.server folder (Windows 7)

Related

How can be set a default proxy setting for all local users for SVN?

I'm trying to automate some SVN commands with Salt-Stack.
The target server is on a network with no access to the SVN server. In order to overcome this issue I'm using a proxy server.
I found that the settings I need to change are in %APPDATA%\Subversion\servers file.
This strategy works fine when it's manually done.
The issue is the the salt-stack minion (agent) is the one that is suppose to make this changes automatically, but unfortunately the minion (agent) is a windows service running as "Local System" logon, therefor the %APPDATA%\Subversion\servers is pointing to system32 and there are no Subversion\servers file.
Is it possible to set global proxy settings for SVN that is applied for all local users?
P.P. I'm using TortoiseSVN.
Thank you in advance!
Thank you for the help!
It turns out the place where I need to store the servers file is in "C:\Windows\System32\config\systemprofile\AppData\Roaming\Subversion"
Now it works fine now :)

Getting "fatal: Authentication failed" -error when sending git commands in Windows 10

After updating domain password, accessing git-repo is no longer possible. VS Code and Source Tree as well as Visual Studio are returning the following error message on pull, push, fetch etc..
fatal: Authentication failed
Normally a credentials pop-up should appear however this is not happening. Also the common recommendation is not working:
git config --global credential.helper wincred
The password is stored in windows credential manager and needs to be updated. Open command prompt and enter the following command to view the list of stored passwords:
rundll32.exe keymgr.dll,KRShowKeyMgr
Scroll down in the list until you spot the git-related entries. Click it and edit the correct password.
VoilĂ !
I agree with Jesper, Other way to do is - On windows, if you can navigate to :
Control Panel\User Accounts\Credential Manager
Under Windows Credentials\Windows Vault page on Generic Credentials, you can update the password of existing GIT record or can also add new Generic Credentials.
Updated answer for Mac users :
In case if you're here with similar issue on Mac, you can do similar thing in keychain access - by deleting the existing GIT record, & then if you pass your credentials again in git bash or any other tool a new record gets created, things should work.
Try the following:
Click Start
Type: Credential Manager
See the Windows Credential Manager shortcut and double-click it to open the application.
Once the app is open, click on the "Windows Credentials" tab.
Locate the credentials that you want removed, they will start with "git:" and might begin with "ada:"
Click on the credential entry, it will open a detail view of the entry.
Click Remove and confirm removal when prompted.
I have experience a similar issue with Windows 10 and here's how I have solved it:
From Windows Search, type Credential Manager:
Open Credential Manager, and navigate to Windows Credential Tab:
You should see an entry for git credentials in Windows Credential Manager:
Here is the root cause, this git credentials is locally cached/saved to your local computer, and since we have changed our Active Directory password, it is currently out of synch.
Click Edit, and change this to your new/changed Active Directory password (this password has to match your new/changed Active Directory password) :
Note: This is for using git with https only, not for SSH: https://docs.github.com/en/free-pro-team#latest/github/using-git/which-remote-url-should-i-use
Save, it should work (does not require terminal or machine restart).
Lastly, if you do not have access to Credentials Manager (due to admin/security policy), you can force git to prompt for password by do a git pull from the specific repo by using username based repo url, e.g.
git pull https://{yourgitusername}#{gitrepo}.git
Note that, this is repo specific so you will have to do this each repo.
Good luck.
Nothing worked for me, even uninstall git and reinstall. What worked for me was to create a Personal Access Token from your github account and use that as the password. This page will detail the procedures: https://medium.com/#ginnyfahs/github-error-authentication-failed-from-command-line-3a545bfd0ca8
I faced the same issue and none of the above mentioned solutions did work. Finally I just removed git for windows and reinstalled the same without any credential managers. This solved the authentication issue with git.
Using Git for Windows (2.30.0), with the cross platform credential manager, with the remote set as a https GitHub address, to a public repository, doing git push by itself wasn't sufficient.
Instead I had to explicitly do git push origin main (replace main with master, or whatever your branch is) to have Git for Windows load a GitHub authentication page where I could authorize the application.
Creating a personal access token, as noted in another answer, was not necessary. Windows credentials were not present in Windows Credential Manager, but were added as Generic Windows Credentials via this method.
I had the same issue when Cloning the repository via Bash/VS Code with "fatal:Authentication failed". I used SSH Key authentication instead to connect my repository following the article: [https://learn.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate?view=azure-devops&tabs=current-page][1]
I didn't get any errors after with any bash commands!
Above solution works only if your machine can SSH.
Try to manually remove setting
credential.helper=wincred from
C:\Users\<YOUR LOGIN>\.gitconfig file it it's there.
For me it helped after password change in LDAP.
Command to change setting didn't helped.
Honestly, what worked for me was installing the latest version of Git (2.36.1) to the day of this comment.
Happened the same: it stoped working after I changed the AD password. But it seems to be a bug in older releases.
This was a tip that Azure DevOps gave:
The only thing which worked for me was to remove the remote and add it back. I have tried deleting the credentials and even reinstalling the git the latest version. But the suggested way to access the remotes repos from Github and Microsoft DevOps is by using a shared key.
I was having the same problem and the best solution would be to insert whenever putting " git clone https://#praat.scm.azurewebsites.net:443/.git " [Insert after http:// your username and # ] and the cloning will work.

List remote refs failed: java.net.ConnectException: Connection time out: github.com

I've recently starting seeing the above error with ever-increasing frequency on our build server. Nothing has changed in our TeamCity configuration during this period, so I'm guessing it might be changes at GitHub that are causing the error.
I've tried changing our VCS polling interval from 60s down to 600s in case GitHub was doing some kind of connection throttling, but there has been no affect.
Is it possible to make TeamCity less sensitive to connection timeouts?
I've figured out the answer.
TeamCity has no issues - it's actually AZURE that has a problem.
For proof, try doing this in your server, where TC is installed.
(command line, of course)
C:\git\bin\git.exe clone https://github.com/libgit2/libgit2.git
and this should not work most of the time.
So AZURE has a networking bug and they know about it and are trying to resolve the issue.
This info was provided via GitHub after they worked with Azure to figure out what was going on.
Conclusion
You have to use SSH KEYS as a current workaround.
We have made it less sensitive: now git-plugin will retry an operation in the case of ConnectException. To get this behaviour you need to install the latest build of git-plugin from teamcity.jetbrains.com. To do that put the zip from the build's artifacts into <TEAMCITY_DATA_DIR>/plugins and restart the server.
You've posted to few information for the question. It's better if you could email the team to teamcity-feedback#jetbrains.com with more details and debug logs from the TeamCity server
Some easy to check things:
* you can open github.com from the server in browser
* you can clone from github.com in the server from console
We've got this error all of sudden today (Feb 23, 2018).
Turns out GitHub.com deprecated some of the security algorithms in their ssh implementation.
Solutions:
switch to "https://..." URL in the affected VCS roots and provide your credentials for authentication
upgrade to the latest TeamCity version
Here's an announcement from JetBrains: https://teamcity-support.jetbrains.com/hc/en-us/community/posts/360000115644-Builds-using-GitHub-com-fail-with-VCS-errors-since-February-22-FIX-AVAILABLE
Switching to ssh helped us to avoid timeouts.
As #Pure.Krome says, you can use SSH KEYS to allow you to access the Azure TFS GIT URL, or you can modify the settings in "Alternative Credentials" by checking "Enable alternate credentials" so you can access the repository by just using a username and password.
First in Azure DevOps go to your project:
Then choose Security in the RHS menu:
Finally choose "Alternate Credentials" in the LHS menu and click the "Enable authentication alternate credentials" where you will then put in your username and password:
Please beware that this is less secure than using the SSH KEYS.
I got this issue even when using ssh. I realized that there was a firewall that was seeing all the ssh traffic as an ssh brute force attack. The firewall would then block the request.
A firewall rule was added to resolve the issue.

Host key verification failed Xcode with Mavericks Server

I'm trying to get a CI setup going and have got Mavericks server downloaded and linked with Xcode all on one machine.
Here's the set up:
Two git repos, hosted on OS X server, named CI and CISubmodule.
CISubmodule added as a submodule to CI
Every time I add bot I get a Host key verification failed error on integration. It's clear from the logs that the server is unable to clone CISubmodule due to an authentication error (I've tried SSH, HTTP, HTTPS) but I don't know why it's failing authentication.
I've set up the server so that logged in users can read and write.
I've tried everything mentioned here.
I'm guessing it's because the server is running as teamsserver and the repo is probably under my username, but I can't figure out how to give it permission to clone. Could it be that the SSH key requires a password? If so, how do I set it up so that it doesn't need a password any more?
Any guidance would be greatly appreciated.
Thanks,
Simon
I had the same case and I am not sure what happend exactly, I think the reason was I had more remote repository accesses and ssh keys pointing git-server side pointing to the same repository.
Deleting the remote repository accesses and cleaning up authorized_keys file helped.
I can confirm the CI server works with submodules, but make sure the .gitmodules file and xccheckout file point to the same repos
you may need to use passphrase-LESS keys for os x server to properly connect to 3rd party hosted git repos. it cannot connect with there is a passphrase needed.
ssh-keygen -p
it worked for us
One thing that helped me was to change my submodule URLs to use HTTPS instead of SSH.
When doing this, make sure that Xcode is actually using the new URLs. Even though I made the changes and pushed them, Xcode was caching the SSH URLs and using them. Remove all your SSH URLS from your server, then also remove them from your client under Preferences->Accounts. Then restart the server and restart Xcode, confirming that the new HTTPS URLs are being used when you create your bot.

Xcode5 bot cannot authenticate to git repo

I've set up a Mavericks box with OS X Server and Xcode 5.01. My source code is on a git repo that I have to access via https with a username and password.
In Xcode (on the same machine), I've cloned the project, built it and run it to check that all is fine. Then I've created a bot, selected the current server and scheme, and hit "integrate now". It fails after 5 seconds. I get:
Cloning into 'https_code_saers_com_myproject'...
fatal: could not read Username for 'https://code.saers.com': Device not configured
I checked that Xcode5 could pull new commits, so it has the username and password, yet by bot does not. Also, the "Device not configured" confuses me.
Any suggestion to how I can explicitly set the Username and Password?
Cheers
Nik
This may just be confusion in terminology, but the bot itself shouldn't be connecting to your repository. OSX Server does that. Before you can create a bot, you should've had to setup your repository in Server. When you do that, you get the opportunity to set username and password for accessing the repository.
It sounds like perhaps you have XCode configured to synch with your repository, but you must separately set up Server to access it as well. See the "XCode" tab in the Server app.
you may be running into the same problem we had- it was passphrase-protected keys. xcode + server + git cannot properly use passphrases on the keys.
thus, you must use a pashphrase-less key with os x server connecting to the git repo.
ssh-keygen -p
hope it helps.
edit: you might need to enable HTTP access to the git repo with this command:
git update-server-info # If planning to serve via HTTP

Resources