alibaba / git-repo-go

git-repo is a command-line tool for centralized workflow, can work with Gerrit, AGit-Flow compatible servers. It is written in Golang, and it can be installed easily without further dependency. It provides an easy-to-use solution for multiple repositories which is introduced by Android repo first, and it can also work with a single repository.
https://git-repo.info/
Apache License 2.0
262 stars 60 forks source link

Manifest remote ssh #16

Closed ratmice closed 3 years ago

ratmice commented 3 years ago

When using a local_manifest/*.xml I noticed that if I specify the pushurl field of a remote, it would always still use ssh://user@host:port/repo.git, this patch attempts to default the pushurl if it is specified in the manifest before a ssh url is generated.

jiangxin commented 3 years ago

Will merge this, and I will create another pull request with additional commts:

  1. Add test cases for pushurl in manifest XML file.
  2. PushURL may have macros as login username, such as '{email}', '{login}', will substitute these macros.
  3. Add new field pushurl in ssh-info response, and do the same substitution.