Anonymously cloning a public repo?


#1

Hi there, i wanted to ask if there is any way to clone a repository anonymously - so without any user/password or public_key authentification.

I am using a NPM based project and tried to add some git-clone dependencies to the project’s dependency list.
NPM has easy peasy support for this. The problem is more over that i cannot get gogs to allow anonymous cloning from public git repositories (as NPM doesn’t really care for keyboard or key based authentification).

So is there any way to enable anonymous git clones for public repositories with gogs?

Gogs Version: 0.11.34.1122 (Dockered, with MySQL)


#2

If I understand the question correctly, you want to clone some NPM packages’ git repos to Gogs, but you want to have it on no ones profile? If so, that can’t be done. All repositories on Gogs (as well as they are on GitHub) are tied to either user or organization. So with that, there can’t be any repository “in limbo”.
My suggestion would be to create organization called i.e. “NPM-packages” and clone those repos to it. Next allow anybody to access to those cloned repos.

BTW Why do you cloning those packages? Why just don’t use them?


#3

My suggestion would be to create organization called i.e. “NPM-packages” and clone those repos to it. Next allow anybody to access to those cloned repos.

The problem with this solution is that it wont allow the anonymous git clone which in turn npm does require for this to work.

BTW Why do you cloning those packages? Why just don’t use them?

Because they aren’t public available packages - rather intern written packages which share code for company internal projects - nothing that belongs into the public. On a server thats also only available company internally - only for projects that are written company internally.

Then let’s put the question that way:
Is there any way to allow anonymous git clone of a repository - without any authentification; not username/password based; not ssh-key based - regardless of if a repository is user or organisation based or do i have to switch back to gitlab?


#4

Gogs does allow such operation for public repositories, are you able to reproduce on demo site?