mirror of
https://github.com/go-gitea/git.git
synced 2026-07-18 20:44:38 -04:00
[GH-ISSUE #33] IsRepoURLAccessible creates interactive prompt #3
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rikvdh on GitHub (Feb 8, 2017).
Original GitHub issue: https://github.com/go-gitea/git/issues/33
Hi,
I'm using your git module and ran into an issue. I use
IsRepoURLAccessibleand with a non-existing repository from github e.g.https://github.com/rikvdh/non-existing.git, I get a prompt on the command-lineUsername for 'https://github.com':For server applications this is not desirable, probably it requires some Git configuration since the function is pretty straight-forward. Any ideas?
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/41787172-isrepourlaccessible-creates-interactive-prompt?utm_campaign=plugin&utm_content=tracker%2F47809898&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F47809898&utm_medium=issues&utm_source=github).@lunny commented on GitHub (Feb 8, 2017):
You have to login before you do any operations.
@rikvdh commented on GitHub (Feb 8, 2017):
@lunny That is not the problem. I'm creating a application where users enter a URI to a repo, I want to check if this is a valid repo. When entering a non-existing repo from github I do not expect interactive prompts on the server-side.
@tboerger commented on GitHub (Feb 9, 2017):
But that's what GitHub responds when you are asking for a repo that is not public available, also for non-existant repos.
@rikvdh commented on GitHub (Feb 10, 2017):
I know, github requests authorization in the Http reponse, but perhaps there is a way (via environment variable e.g.) to disable interactive Git prompts here?
@rikvdh commented on GitHub (Apr 7, 2017):
A solution to this is to add
"-c", "core.askpass=true"to the git commandline, this disables the askpass program to prompt interactively. Only this might not work on for example Windows.IsRepoURLAccessible creates interactive promptto [GH-ISSUE #33] IsRepoURLAccessible creates interactive prompt