LoginSignup
0
0

More than 1 year has passed since last update.

Githubの新しいgit push 2022

Posted at

2021年8月からhttpsのlocalでpushできなくなった(パスワードでアクセルできない)ので

変更点と新しいgit pushの仕方を説明します。

先にファイルに入れたアプリを作成しておきます。

githubでレポジトリを作成します。

httpsとsshがありますがhttpsのままで大丈夫です。

次にホーム画面の右上のマイアイコンからsettingを選びます。

developer settingを選び、personal access tokenを選びます。

名前をmytoken20221010などとしておき、

setting optionでrepoだけを選ぶ。

入力が完了したら、generate tokenをクリック

tokenが発行されたらコピーして控えておきます。

それからコマンドラインでcd test-appのようにアプリまで場所を移動して

git init

git add .

git commit -m "first commit"

it remote add origin https://github.com/githubのユーザ名/アプリ名.git

git branch -M main

git push -u origin main

これをコマンドラインで入力し終えたら、githubのユーザ名とパスワードが訊かれます。

githubのユーザー名はそのまま入力して構いません、

パスワードはgithubのではなく先ほどコピーして控えておいたtokenを貼り付け入力します。

これでgithubにアプリをpushできました。

参考にしたサイト

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