25
21

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

githubからアクセストークンでcloneする

Posted at

概要

dockerなどを使っている場合に、ID/PASSや秘密鍵・公開鍵を使わずに、簡易にcloneできないか調べた内容をメモしておく。

サンプルコマンド

# Config
$ export GIT_EMAIL=hoge@example.com
$ export GIT_USER=hoge
$ export GIT_TOKEN=************************
$ export GIT_REPOSITORY=Example-Inc/example.com.git

# Git
$ git clone https://${GIT_USER}:${GIT_TOKEN}@github.com/${GIT_REPOSITORY} .
$ git config --local user.name ${GIT_USER}
$ git config --local user.email ${GIT_EMAIL}

参考サイト

25
21
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
25
21

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?