[GH-ISSUE #33] IsRepoURLAccessible creates interactive prompt #3

Closed
opened 2026-02-16 10:23:44 -05:00 by yindo · 5 comments
Owner

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 IsRepoURLAccessible and with a non-existing repository from github e.g. https://github.com/rikvdh/non-existing.git, I get a prompt on the command-line Username 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).
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 `IsRepoURLAccessible` and with a non-existing repository from github e.g. `https://github.com/rikvdh/non-existing.git`, I get a prompt on the command-line `Username 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? <bountysource-plugin> --- 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). </bountysource-plugin>
yindo added the reviewed/wontfix label 2026-02-16 10:23:44 -05:00
yindo closed this issue 2026-02-16 10:23:44 -05:00
Author
Owner

@lunny commented on GitHub (Feb 8, 2017):

You have to login before you do any operations.

@lunny commented on GitHub (Feb 8, 2017): You have to login before you do any operations.
Author
Owner

@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.

@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.
Author
Owner

@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.

@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.
Author
Owner

@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 (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?
Author
Owner

@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.

@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.
yindo changed title from IsRepoURLAccessible creates interactive prompt to [GH-ISSUE #33] IsRepoURLAccessible creates interactive prompt 2026-06-05 16:30:40 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: go-gitea/git#3