Galivan
Galivan

Reputation: 5358

How to find current git repository url by command line

I want to get the repository url so that I can connect to it from local repo.

I ssh into the remote repository, and now I need the url. The remote repository however has a remote url of its own, if that matters.

So if I do git config --get remote.origin.url , it shows some remote address that's completely wrong.

So how do I get the url on the repo I'm currently ssh:ed into?

Upvotes: 0

Views: 3813

Answers (1)

Try:

ssh://[email protected]:12345/~/path/repository

where ~ means the home directory of the user and path/repository is the relative path of the repository to the home directory.

Upvotes: 2

Related Questions