allow explicit GITHUB_USER and GITHUB_PASS #21

Closed
jnweiger wants to merge 1 commits from jnweiger/gitea-github-migrator:master into master

when migrating a private repo from an organization, the following error occurs:

gitea-github-migrator_linux_amd64 migrate --gh-token $GITHUB_TOKEN --token $GITEA_TOKEN --owner 1 --gh-repo $ORGA/$REPO --url $GITEA_SERVER

panic: error while migrating repo[ORGA/REPO]: Clone: exit status 128 - fatal: could not read Username for 'https://github.com': No such device or address

This patch fices htat by allowing to infuse the correct credentials like this:

env GITHUB_PASS=$GITHUB_TOKEN GITHUB_USER=jnweiger ~/go/bin/gitea-github-migrator migrate --gh-token $GITHUB_TOKEN --token $GITEA_TOKEN --owner 1 --gh-repo $ORGA/$REPO --url $GITEA_SERVER

Not the nicest implementation, but this gets me going. Thank you for a great tool!

when migrating a private repo from an organization, the following error occurs: gitea-github-migrator_linux_amd64 migrate --gh-token $GITHUB_TOKEN --token $GITEA_TOKEN --owner 1 --gh-repo $ORGA/$REPO --url $GITEA_SERVER panic: error while migrating repo[ORGA/REPO]: Clone: exit status 128 - fatal: could not read Username for 'https://github.com': No such device or address This patch fices htat by allowing to infuse the correct credentials like this: env GITHUB_PASS=$GITHUB_TOKEN GITHUB_USER=jnweiger ~/go/bin/gitea-github-migrator migrate --gh-token $GITHUB_TOKEN --token $GITEA_TOKEN --owner 1 --gh-repo $ORGA/$REPO --url $GITEA_SERVER Not the nicest implementation, but this gets me going. Thank you for a great tool!
Poster

This fixes #23

This fixes https://git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator/issues/23

Thank you for the PR. Please add GITHUB_USER and GITHUB_PASS as cli flag like done with gh-token: https://git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator/src/branch/master/cmd/flags.go#L20

Thank you for the PR. Please add `GITHUB_USER` and `GITHUB_PASS` as cli flag like done with `gh-token`: https://git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator/src/branch/master/cmd/flags.go#L20
JonasFranzDEV added the
enhancement
label 6 years ago
JonasFranzDEV added this to the 0.1.0 milestone 6 years ago

And also add this to migrate-all.

And also add this to `migrate-all`.
JonasFranzDEV closed this pull request 5 years ago
Some checks failed
the build failed
Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: JonasFranzDEV/gitea-github-migrator#21
Loading…
There is no content yet.