RexOps / RexOps/Rex

Rex::SCM::Subversion and --trust-server-cert-failures

Open
#1,072 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Perl
Stars
737
Forks
214
PR merge metrics
No merged PRs in 30d

Description

From @vikasnkumar on July 14, 2016 3:35

Hello @krimdomu

I am using Rex to manage some Ubuntu 16.06 Xenial servers where code from internal SVN repositories are being checked out and built.

Ubuntu Xenial has Subversion 1.9.3 and that supports the --trust-server-cert-failures option, which isn't supported in Rex::SCM::Subversion::checkout function.

That is ok. The checkout() function argument list has an option $checkout_opt for custom options from the user but this variable is not being used anywhere in creating the final run commandline.

Hence, I am having to use a hack like the following:

 if (is_dir($CODE_DIR)) {
        run "svn up --username $USER --password $PASSWD --non-interactive --trust-server-cert --trust-server-cert-failures cn-mismatch $CODE_DIR";
 } else {
        run "svn co --username $USER --password $PASSWD --non-interactive --trust-server-cert --trust-server-cert-failures cn-mismatch $REPO_URL $CODE_DIR";
  }

Please make an update that allows either $checkout_opt or --trust-server-cert-failures to work, preferably the former. That will also allow custom options like --depth=1 to work.

Thank you.

Copied from original issue: krimdomu/rex-scm#1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Rex::SCM::Subversion::checkout and trace how its $checkout_opt argument is handled when creating the svn checkout and update commands. Verify the resulting run commands include custom options such as --trust-server-cert-failures or --depth=1 for both existing and new checkout directories.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.