Purpose:
Use kwallet to save SVN credential instead of plain-text password.
Prerequisites:
Subversion client, systemsettings from KDE, kwallet, libsvn_auth_kwallet-1-0
Limitation:
To run svn client to use kwallet, you have to run it on the client GUI console.
Install Subversion Client
Install subversion from SuSE repository,
For SLE 11 SP3 run the following as root:
# zypper addrepo http://download.opensuse.org/repositories/devel:tools:scm:svn/SLE_11_SP3/devel:tools:scm:svn.repo
# zypper refresh
# zypper install subversion
For SLE 11 SP2 run the following as root:
# zypper addrepo http://download.opensuse.org/repositories/devel:tools:scm:svn/SLE_11_SP2/devel:tools:scm:svn.repo
# zypper refresh
# zypper install subversion
For SLE 11 run the following as root:
# zypper addrepo http://download.opensuse.org/repositories/devel:tools:scm:svn/SLE_11/devel:tools:scm:svn.repo
# zypper refresh
# zypper install subversion
Install Systemsettings
Ignore this step if Systemsettings has been installed on your desktop
# zypper install kdebase4-workspace
Install kwallet
Ignore this step if kwallet has been installed on your desktop
# zypper install kwallet
Install libsvn_auth_kwallet-1-0
Ignore this step if libsvn_auth_kwallet-1-0 package has been installed on your desktop
# zypper in libsvn_auth_kwallet-1-0
Enable and configure kwallet
Login as root, and run systemsettings.
Choose Tab Advanced -> KDE Wallet
In KDE Wallet Configuration Window -> Wallet Preference:
Check Enable KDE Wallet Subsystem, and click New button to create new wallet
Give a name to the new wallet, i.e. aniu
Input password to protect your wallet, and click Create
Click Apply, then Click Launch Wallet Manager which is right above Apply Button
Close the configuration button
Configure subversion client
Run svn, and it will create ~/.subversion folder and the configuration files needed.
# cd ~/.subversion
edit config, and add below entry in [auth] section:
password-stores = kwallet
edit server, and add below entries in [global] section:
store-passwords = yes
store-plaintext-passwords = no
Verify Integration
On client desktop, start xterm,
# cd /var/tmp
# mkdir test
# svn co <url>
After you type in username and password, a GUI window pops up to ask your wallet password, and then choose Allow Always.
You may got Segmentation Fault message, please ignore it, and run the command again.
If it says the folder has been locked, please run svn cleanup to unlock the folder, run the checkout command again.
Check the wallet, you would be able to see a new folder called Subversion with one password.
Keep your wallet password secret because with it, people can see your svn password stored in the wallet.
Run below command, it won't ask you for password anymore.
# svn up
No comments:
Post a Comment