8
5

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する

Last updated at Posted at 2018-06-24

概要

githubからPersonal Access Tokensを使ってコードをcloneする手順をメモしておく。

Github情報

環境変数に定義する。

ターミナル
export GIT_USER=hoge
expoft GIT_EMAIL=hoge@example.com
export GIT_TOKEN=**************************
export GIT_REPOSITORY=example/ruby2.5

コード配置

下記コマンドにてcloneする。

ターミナル
git clone https://${GIT_USER}:${GIT_TOKEN}@github.com/${GIT_REPOSITORY} .

Git環境設定

必要であれば、下記コマンドでgit設定を行う。

ターミナル
git config --local user.name ${GIT_USER}
git config --local user.email ${GIT_EMAIL}

以上

8
5
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
8
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?