Git clone doesn't ask for password

Please take a moment to search that a question/solution doesn’t already exist.

Yes, I did. I searched in the gogs discussion forum and also in stack exchange and internet.

Also, please provide your Gogs version, system, database.

Gogs version 0.11.97.1116

If it’s a bug, try to reproduce on https://try.gogs.io, if you can’t, please upgrade to latest release first.

Otherwise, do not post pure useless information with a lot of vague words.

YOU DO NOT FOLLOW THE TEMPLATE, WE DO NOT OFFER HELP.

Hopefully, this is not useless.

I installed Gogs from source, and now I’m able to add repositories etc. But my problem is that I can clone a repository (or any one can clone my repositories), WITHOUT any prompt for username or password.

How do I set up protection?

Here is an example:

/tmp » git clone http://gogs.local:3000/pratap/stuff.git [email protected]
Cloning into ‘stuff’…
remote: Enumerating objects: 38, done.
remote: Counting objects: 100% (38/38), done.
remote: Compressing objects: 100% (35/35), done.
remote: Total 38 (delta 14), reused 0 (delta 0)
Unpacking objects: 100% (38/38), done.

I was not prompted at all.

Thanks for the help!

Pratap

If your repository is public, anyone can clone. You can set it to private in the repository settings.

You are correct. Once I marked the repository as private, the clone operation asked me for userid and password.

However, when I try this on try.gogs.io, on a sample repository, whether I mark the repository as private or not, the clone operation asks for userid/password. Why is that the case?

Thanks,

Pratap

Because the demo site has enabled everyone must sign in to view anything: