Comments (13)
I don't think I realized log_error
exits the whole script when I wrote that PR:
python-github-backup/bin/github-backup
Line 49 in 38bf438
My proposed solution:
- Make a
log_warning
function which writes tostderr
but does not exit the script - Use
log_warning
here instead oflog_error
- Add conditional to only log this warning if
!args.organization
from python-github-backup.
Ah yes, that is much more correct. I use a token as well, but added -u
in testing this.
from python-github-backup.
I wrote my first comment hastily and it was incorrect (now deleted). I am looking at this.
from python-github-backup.
So as stated in my original comment your proposed solution is not correct, as it assumes you are using the --username
option for basic auth which is not required.
I fail to see the issue here, if you are passing --organization
option then
python-github-backup/bin/github-backup
Lines 533 to 536 in 38bf438
will be executed and override the template
for an organization
from python-github-backup.
Then the readme needs a bit of work, as it instructs you to:
github-backup WhiteHouse --token $ACCESS_TOKEN --organization --output-directory /tmp/white-house --repositories
Take this example I just ran:
+ pipenv run github-backup MYORG --token **** --prefer-ssh --private --output-directory=/hadoop/backups/github/github-backup --all
Authenticated user is different from user being backed up, thus private repositories cannot be accessed
Backing up user MYORG to /hadoop/backups/github/github-backup
Requesting https://api.github.com/user?per_page=100&page=1
Retrieving repositories
Why would this be failing then?
from python-github-backup.
I think the only issue is that
Authenticated user is different from user being backed up, thus private repositories cannot be accessed
is being logged incorrectly. Are private repos not being backed up? Is anything being backed up? I cannot tell what is written to disk from your log statement.
from python-github-backup.
Nothing backs up as the process fails entirely. From Jenkins:
+ pipenv run github-backup MYORG --token **** --prefer-ssh --private --output-directory=/hadoop/backups/github/github-backup --all
Authenticated user is different from user being backed up, thus private repositories cannot be accessed
Backing up user MYORG to /hadoop/backups/github/github-backup
Requesting https://api.github.com/user?per_page=100&page=1
Retrieving repositories
[Pipeline] }
[Pipeline] // withCredentials
[Pipeline] }
[Pipeline] // stage
[Pipeline] hipchatSend
[INFO] HipChat notification sent to the following rooms: Jenkins
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
[BFA] Scanning build for known causes...
[BFA] No failure causes found
[BFA] Done. 0s
ERROR: script returned exit code 1
Finished: FAILURE
$ ls /hadoop/backups/github/github-backup/ | wc -l
0
Yes I figured the if conditional set needs a little update.
from python-github-backup.
Are you drafting a PR for this fix? Just want to make sure I am not duplicating efforts.
from python-github-backup.
from python-github-backup.
I'll work on a PR this week
from python-github-backup.
#103 still crashes my backups:
+ pipenv install --skip-lock github-backup
Installing github-backup…
Collecting github-backup
Downloading https://files.pythonhosted.org/packages/a3/2c/1b571c0335507b47b0f21633b43c60996a078fa32d72d6f4514249e1fb93/github_backup-0.21.1-py2-none-any.whl
Installing collected packages: github-backup
Successfully installed github-backup-0.21.1
[...]
+ pipenv run github-backup MyOrg --token **** --prefer-ssh --private --output-directory=/backups/github/github-backup --all
Authenticated user is different from user being backed up, thus private repositories cannot be accessed
Backing up user MyOrg to /backups/github/github-backup
Requesting https://api.github.com/user?per_page=100&page=1
Retrieving repositories
[Pipeline] }
[Pipeline] // withCredentials
[Pipeline] }
[Pipeline] // stage
[Pipeline] hipchatSend
[INFO] HipChat notification sent to the following rooms: Jenkins
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
[BFA] Scanning build for known causes...
[BFA] No failure causes found
[BFA] Done. 0s
from python-github-backup.
My PR has not been released yet
from python-github-backup.
ah.. sorry. I thought it had been released. My mistake.
from python-github-backup.
Related Issues (20)
- Github-backup in 140 repository org backups nothing HOT 3
- Exclude specific repositories from backup HOT 1
- Add support for fine-grained tokens HOT 2
- Proposal to use API repository `pushed_at` instead of `update_at` field for `last_updated`
- something awry in --releases HOT 1
- When the `--lfs` option is used, after first clone non-lfs content is no longer fetched HOT 1
- Feature: offer docs how to run in docker HOT 4
- ERROR: 'gaierror' object is not iterable
- Automate releases HOT 5
- `--all-starred` does not backup anything HOT 7
- Backing up releases using fine-grained token ends with an error HOT 3
- Include repository security advisories HOT 1
- Safer incremental backups HOT 1
- Restoring from backup HOT 3
- Error: "Skipping repo since it's not initialized" using Docker HOT 4
- Additionally, a flag such as `--include-assets REPO_NAME_REGEX` to do the opposite and only download assets for matching repos would be very useful as well.
- Re-running the utility does not update the local files HOT 6
- Publish new release to include Docker permission fixes in latest HOT 1
- Discussions not backed up HOT 1
- Filters that use "name" break when backing up gists
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-github-backup.