The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Separate passwords for svn/ssh via SwitchTower

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jamis Buck

Posts: 184
Nickname: minam
Registered: Oct, 2004

Jamis Buck is a C/Java software developer for BYU, and hacks in Ruby for fun.
Separate passwords for svn/ssh via SwitchTower Posted: Jan 16, 2006 11:09 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Jamis Buck.
Original Post: Separate passwords for svn/ssh via SwitchTower
Feed Title: the buckblogs here
Feed URL: http://weblog.jamisbuck.org/blog.cgi/programming/index.rss
Feed Description: Jamis Buck's corner of the blogging universe. Mostly about ruby, but includes ramblings on a variety of topics.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Jamis Buck
Latest Posts From the buckblogs here

Advertisement

One of SwitchTower’s assumptions is that the password you use to access your deployment machines is the same password you use to access your source code repository. For many people, this isn’t the case. I’ll be working on making this scenario cleaner in the next release, but in the meantime, you might consider something like this:

set :svn_user, ENV['USER']
set :svn_password,
  Proc.new { SwitchTower::CLI.password_prompt('SNV Password: ') }
set :repository,
  Proc.new { "--username #{svn_user} " +
             "--password #{svn_password} " +    
             "http://svn.blah.com/project" }

Procs are used for some of the variables so that they aren’t evaluated until the first time they are needed. This way, if you are running a ST task that doesn’t need the svn password, you don’t get prompted for it.

(Thanks to Craig Davey for pointing out that you can put the username and password in the repository line. Nice hack!)

Read: Separate passwords for svn/ssh via SwitchTower

Topic: 1.8.4 upgrade frenzy to solve the plastic (explosive) Ruby puzzle? Previous Topic   Next Topic Topic: Refresh Phoenix January Meeting

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use