Home > front end >  How to find current git repository url by command line
How to find current git repository url by command line

Time:11-26

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?

CodePudding user response:

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.

  •  Tags:  
  • git
  • Related