G-Node / gin-cli

Command line client for GIN
https://gin.g-node.org
Other
12 stars 6 forks source link

repo creation from command line in organization puts repo in personnal page #320

Open arovai opened 1 year ago

arovai commented 1 year ago

Suppose I have created an organisation called arovaitestorga. I want to push some local repo to this organisation. The organization already exists but the repo doesn't exist on the organization page.

The repo is locally created in a standard way (gin init etc).

The name of the server is gingnode and corresponds to gin.g-node.org:

gin logout
gin add-server --web https://gin.g-node.org:443 --git git@gin.g-node.org:22 gingnode
gin use-server gingnode
gin login

Up to this point everything works well. Then I run:

gin add-remote origin gingnode:arovaitestorga/testorga

Output seems fine:

:: Checking remote: not found
Remote ssh://git@gin.g-node.org:22/arovaitestorga/testorga does not exist. Would you like to create it?
[c]reate / [a]dd anyway / a[b]ort: c
:: Creating repository 'arovaitestorga/testorga' OK
:: Added new remote: origin [ssh://git@gin.g-node.org:22/arovaitestorga/testorga]
:: Default remote: origin

In particular I am prompted to create a repo in the organisation page, which is exactly what I desire.

But then, when I check my organisation webpage, there is nothing new there. Moreover, a repo testorga has been created in arovai/testorga!

So somehow gin is pretending to create a repo in the organization but in fact does it in my personal repo page. In particular, running gin upload or gin sync produces errors (repo doesn't exist etc).

Is this a bug?

PS: easy workaround is to manually create empty repo in organization page. Then uploading/syncing works.

twachtler commented 1 year ago

The gin client currently supports creation of new repos only under the user's account. The client's message as you describe is incorrect and needs to be fixed. Thanks for bringing this up!

PS: Another workaround is to transfer the ownership of the repo from the user's account to the organization.

FPa-riken commented 1 year ago

related to #306