Skip to content

Import to github

ccc edited this page Apr 7, 2019 · 3 revisions

Even krep is designed to work with gerrit as the purpose, it supports to work with github either. Not like gerrit to work with ssh on port 29418, github can also support protocol ssh with scp-like syntax.

Because krep does handle too many adaptions to gerrit, it's not that easy for it to work with github directly. But it's still no problem to use krep as the example:

krep git --remote ssh://git@github.com/cadappl/krep --all

If verbose is provided, the push command will be printed. And it'll be known that GitProject will remove user from the url and might cause the error without permissions. The fix can be to update ~/.gitconfig with an InsteadOf to use the scp syntax.

[url "git@github.com:"]
	insteadOf = https://github.com/
	insteadOf = ssh://github.com/

The sub-commands repo and repo-mirror can be used in the similar way to import a git-repo project successfully.

Meaningfully, git-repo project can also be supported by the tool. One more command option --no-gerrit needs to be added to the command to suppress the tool to query all included projects from the remote server, which is using gerrit command.