christianspecht / scm-backup

Makes offline backups of your cloud hosted source code repositories
https://scm-backup.org/
GNU General Public License v3.0
59 stars 20 forks source link

When the username is in the URL, the password value isn't used #20

Closed Fydon closed 5 years ago

Fydon commented 6 years ago

This resolves #19

christianspecht commented 6 years ago

Thanks for the contribution, unfortunately I can't use it as-is: Your solution throws an exception when executed without authentication.

There are tests which catch this, and in fact they failed in the automatic AppVeyor build that was triggered by your pull request. No idea why AppVeyor considers this a successful build, the build script should fail when at least one test fails (and it actually did so in the past).

You can also see the error if you execute the application with a config file without authentication, for example this one:

localFolder: 'c:\scm-backup'

waitSecondsOnError: 5

sources:

  - title:  bb_singleuser
    hoster: bitbucket
    type: user
    name: scm-backup-testuser

Additional note:

There's already a helper class for URLs in the project, and it has a method which strips the user name from URLs -> consider using this instead of manually replacing strings.