Comments (12)
I started adding some logging info to debug this, turns out the request returns back an empty list, []. Turns out -u is required, but not checked for. Which then prompts for a password, which it should not if I issued to prefer ssh
bin/github-backup -u user <NAME>--prefer-ssh --private --organization --output-directory ~/gitbak --all
Backing up user <NAME> to /home/user/gitbak
Retrieving repositories
Password:
If -u is left out, getpasswd should be used to obtain the current user.
from python-github-backup.
Ok works with a token, all of which these things should be checked for at runtime. Is there no other way?
from python-github-backup.
@mtdeguzis If you set --user
, you probably also want to set --password
(its for basic auth). The alternative is to use a token, as you found. getpasswd
isnt a good alternative here because your local username probably does not match your github username (mine doesn't).
I suppose if we set the --private
flag, we should also check for auth. Mind making a pull request for that?
from python-github-backup.
I could probably take a look at add the check. I'll look at submitting a PR.
from python-github-backup.
Actually, this checks for the pw, so nothing to do here:
github-backup ORG -u mtdeguzis --prefer-ssh --private --organization --output-directory ~/gitbak --all
We actually need to check for user. If that is left out, the program kicks of as if nothing is wrong. But I get what you mean, get_auth can be issued if --private is used.
from python-github-backup.
How about..
350 def retrieve_data(args, template, query_args=None, single_request=False):
351 auth = get_auth(args)
352 if not auth and args.private:
353 sys.exit("Authentication is required for private repositories")
354 query_args = get_query_args(query_args)
355 per_page = 100
356 page = 0
357 data = []
... when a user attempts to retrieve data from a private repository?
Backing up user ORG to /home/mtdeguzis/gitbak
Retrieving repositories
Authentication is required for private repositories (token or password)
from python-github-backup.
Hello! It would be nice to add authentication by the ssh key (without password)
from python-github-backup.
@breezzz pull request welcome.
from python-github-backup.
This looks done with #74?
from python-github-backup.
That was never merged.
from python-github-backup.
Derp, somehow missed that. Should this be implemented as a failure or a warning? I am thinking similar to this:
python-github-backup/bin/github-backup
Line 539 in 89ee22c
from python-github-backup.
warning is fine.
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.