Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On MacOS, it will ask for username/password every time after VSCode restart #652

Closed
netsesame2 opened this issue Aug 12, 2019 · 13 comments
Closed

Comments

@netsesame2
Copy link

  • VSCode Version: 1.37.0
  • OS Version: Darwin x64 18.7.0
  • Extension Version:1.54.4
  • System Language:English
  • SVN Version:1.8.13

Issue

Recently, every time when I restart VSCode, SVN will ask for username and password. However, when I offer the username and password, it works, but when I restart VSCode, it ask again. I'm nearly crazy.

Steps to Reproduce

SVN Output

Screenshots

QQ20190812-233357@2x

@netsesame2 netsesame2 changed the title On Macbook, ask for username/password every time after VSCode restart On MacOS, it will ask for username/password every time after VSCode restart Aug 12, 2019
@JohnstonCode
Copy link
Owner

Do you have the issue on an older version fo the extension?

@netsesame2
Copy link
Author

@JohnstonCode The older version works well

@JohnstonCode
Copy link
Owner

Which version?

@netsesame2
Copy link
Author

@JohnstonCode I forgot to get the old version...

@netsesame2
Copy link
Author

netsesame2 commented Aug 21, 2019

@JohnstonCode To my strange, two different projects, using the same SVN server, one is OK, and the other need uname/password every time.

@JohnstonCode
Copy link
Owner

Can you copy the output of "View >> Output >> OUTPUT >> SVN" from each of the projects please

@netsesame2
Copy link
Author

netsesame2 commented Aug 27, 2019 via email

@netsesame2
Copy link
Author

The following output both copied after restart vscode.
The svn output which works well:

Using svn "1.8.13" from "/usr/local/bin/svn"
[ErrorbookWeb]$ svn info --xml /Users/netsesame/Projects/ErrorbookWeb/caches/configs/product.php
[ErrorbookWeb]$ svn info --xml
[ErrorbookWeb]$ svn cat caches/configs/product.php
[ErrorbookWeb]$ svn stat --xml --no-ignore --ignore-externals --show-updates

Another which works always ask username:

Using svn "1.8.13" from "/usr/local/bin/svn"
[ErrorbookApp3]$ svn info --xml /Users/netsesame/Projects/ErrorbookApp3/src/global.scss
[ErrorbookApp3]$ svn cat src/global.scss
[ErrorbookApp3]$ svn info --xml
[ErrorbookApp3]$ svn stat --xml --no-ignore --ignore-externals --show-updates
[ErrorbookApp3]$ svn: E170001: Unable to connect to a repository at URL 'svn://www.shikongzi.com/mysa_app3'
[ErrorbookApp3]$ svn: E170001: Can't get username or password

@Constantiner
Copy link

I have the same issue on MacOS X and it was the same all the time I used extension. I suppose extension has some problems with Keychain access but very possibly I've mistaken.

Vote for fixing that!

@Constantiner
Copy link

Constantiner commented Sep 3, 2019

Yesterday I've solved it on MacOS. It is definitely related to Keychain. SVN extension asks username/password on VS Code start up on MacOS when password is storing in Keychain.

You can go to ~/.subversion/auth/svn.simple and find there a file with your SVN domain and username. It will contain something like:

K 8
passtype
V 8
keychain

and it tells us it stores password in Keychain. To solve it (I mean to make it work with current version of SVN extension) just delete this file, then add the following to the [auth] section of ~/.subversion/config file:

password-stores=

Then run the following in Terminal in your project's catalog:

svn up

and enter your login/password there. After that find newly created file for your SVN domain in ~/.subversion/auth/svn.simple and make sure it contains something like the following:

K 8
passtype
V 6
simple

Unfortunately it will contain your SVN password in plain text and it is not great for security reasons but we need to wait for fix of SVN extension's Macos Keychain access issue to return back to secure stroing of Subversion passwords.

Now you can restart your VS Code and it should not request for SVN username/password.

@netsesame2
Copy link
Author

Thanks for @Constantiner. I followed your advise, and found another simple way to resolve it.

  1. Goto ~/.subversion/auth/svn.simple
  2. Find and delete the config file which contains my svn site.
  3. Open the Keychain Tool in control center, remove the related key.
  4. Goto my project folder, run 'svn up --username xxxx --password xxxx'
  5. Reopen VSCode. it will be OK.

@fattoliu
Copy link

Thanks for @Constantiner . I've solved it on macOS Catalina. Cool!!

edgardmessias added a commit to edgardmessias/svn-scm that referenced this issue Feb 11, 2020
edgardmessias added a commit to edgardmessias/svn-scm that referenced this issue Feb 11, 2020
edgardmessias added a commit to edgardmessias/svn-scm that referenced this issue Feb 11, 2020
JohnstonCode added a commit that referenced this issue Feb 11, 2020
## [2.6.2](v2.6.1...v2.6.2) (2020-02-11)

### Bug Fixes

* Fixed repeated auths prompt (close [#652](#652)) ([#799](#799)) ([42e64a9](42e64a9))
@JohnstonCode
Copy link
Owner

🎉 This issue has been resolved in version 2.6.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants