LoginSignup
0
0

More than 3 years have passed since last update.

RepoコマンドでGitHubのリポジトリ指定する方法

Posted at

環境

repo version v2.8

サンプルコード

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <remote
    name="origin"
    fetch="git://github.com/ksilverwall"
    pushurl="git@github.com:ksilverwall"
  />
  <default revision="master" remote="origin" />

  <project name="thankshell-react" path="thankshell-react"/>
</manifest>

解説

fetchとpushurlを別々に指定しています。
気持ち悪いんですが、統一すると上手く動きません。

githubはfetch時は git://git@ の両方のURLを受け付けるのですが、Push時には git@ しか受け付けません。
(2020-06-06時点)

それを踏まえると git@ に統一すると通りそうな気もしますが、sync時に以下のようなエラーが出ます。

% repo sync                     
fatal: remote error: 
   is not a valid repository name
  Email support@github.com for help
thankshell-api:
fatal: remote error: 
   is not a valid repository name
  Email support@github.com for help

ソース読んでないのでrepoコマンドの不具合なのか何なのかわからないのですが、今の所使えないので、苦肉の策としてfetchとpushのURLを分けたら通りました。

将来的に修正されるかもしれないし、もっとうまいやり方があるかもしれませんので見つけられたからは記事 or 修正リクエスト or コメントお願いします。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0