Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9243031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:43:04+00:00 2026-06-18T08:43:04+00:00

I need a script that updates my copy of a repository. When I type

  • 0

I need a script that updates my copy of a repository. When I type “svn up” I usually am forced to enter a password, how do I automate the password entry?

What I’ve tried:

import pexpect, sys, re

pexpect.run("svn cleanup")

child = pexpect.spawn('svn up')
child.logfile = sys.stdout

child.expect("Enter passphrase for key \'/home/rcompton/.ssh/id_rsa\':")

child.sendline("majorSecurityBreach")

matchanything = re.compile('.*', re.DOTALL)

child.expect(matchanything)

child.close()

But it does not seem to be updating.

edit: If it matters, I can get my repository to update with child.interact()

import pexpect, sys, re

pexpect.run("svn cleanup")

child = pexpect.spawn('svn up')
child.logfile = sys.stdout

i = child.expect("Enter passphrase for key \'/home/rcompton/.ssh/id_rsa\':")

child.interact()

allows me to enter my password and starts updating. However, I end up with an error anyway.

-bash-3.2$ python2.7 exRepUpdate.py 
Enter passphrase for key '/home/rcompton/.ssh/id_rsa':  

At revision 4386.
At revision 4386.
Traceback (most recent call last):
  File "exRepUpdate.py", line 13, in <module>
    child.interact()
  File "build/bdist.linux-x86_64/egg/pexpect.py", line 1497, in interact
  File "build/bdist.linux-x86_64/egg/pexpect.py", line 1525, in __interact_copy
  File "build/bdist.linux-x86_64/egg/pexpect.py", line 1515, in __interact_read
OSError: [Errno 5] Input/output error

edit: Alright I found a way around plaintext password entry. An important detail I left out (which, honestly, I didn’t think I’d need since this seemed like it would be an easy problem) is that I had to send a public key to our IT dept. when I first got access to the repo. Avoiding the password entry with in the ssh+svn that I’m dealing with can be done with ssh-agent. This link: http://mah.everybody.org/docs/ssh gives an easy overview. The solution Joseph M. Reagle by way of Daniel Starin only requires I enter my password one time ever, on login, allowing me to execute my script each night despite the password entry.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:43:05+00:00Added an answer on June 18, 2026 at 8:43 am

    If you don’t want to type password many times, but still have a secure solution you can use ssh-agent to keep your key passphrases for a while. If you use your default private key simply type ssh-add and give your passphrase when asked.

    More details on ssh-add command usage are here: linux.die.net/man/1/ssh-add

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've written an script that updates a version on a certain file. I need
I need a script that will test an input field's contents to see if
I need a script that simply formats a value (eg 4567643) to (4,567,643). No
I need a script that inserts a number at some point into a file
I need a script that will insert the current date and time in an
Pretty simple: I need a script that reads the element ij of TWO images
i need an sql script that is going to change the datasource of all
I need an Autohotkey script that puts the selected text in these opening and
I need to run a script that will generate the projects.list file when a
I need a java script function that converts the document object of the current

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.