| サンプル集 |
|
■VC ■C# ■Java ■BorlandC ■LinuxC ■MS-DOS ■bash ■Excel VBA ■VBScript ■PHP ■HTML ■perl ■iPhone ■Android ■Lua ■WordPress ■PowerShell ■Python ■Flutter ■Rust ■Node.js ■other |
| Linuxコマンド |
| 用語集 |
| debian メモ |
| apache2 メモ |
| MySQL メモ |
| Oracle メモ |
| PostgreSQL |
| HOME |
GitHubにプッシュします。
アクセストークンの生成
GitHubのHOMEを開きます。

Settingsをクリックします。

下にスクロールさせてDeveloper settingsをクリックします。

Personal access tokensをクリックします。

Fine-grained tokensをクリックしGenerate new tokenをクリックします。

パスワードを入力しConfirmをクリックします。

必要な情報を入力します。
| Token name | admin |
|---|---|
| Repository access | All repositories |

Add permissionsをクリックし全部チェックします。

下までスクロールさせて全部チェックしGenerate tokenをクリックします。

Generate tokenをクリックします。

tokenが生成されたのでコピーしておきます。

リポジトリの作成
GitHubのHOMEを開きNewをクリックします。

Repository nameにgit-workと入力したところgit-work is availableと表示されました。

Choose visibilityはPrivateを選択しCreate repositoryをクリックします。

リポジトリが作成できたようです。

git push
リポジトリのページを下にスクロールさせると...or push an existing repository from the command lineという表示があります。

表示されているコマンドをコマンドプロンプトで実行してみます。
>cd \git-work
C:\git-work>git remote add origin git@github.com:ymlib32/git-work.git
C:\git-work>git branch -M main
C:\git-work>git push -u origin main
The authenticity of host 'github.com (20.27.177.113)' can't be establ
ished.
ED25519 key fingerprint is SHA256:+DDD333vVVVuJJJbbbssS/zLLL000MMMHdk
dkvCqqqU.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
C:\git-work>git remote add origin git@github.com:ymlib32/git-work.git
C:\git-work>git branch -M main
C:\git-work>git push -u origin main
The authenticity of host 'github.com (20.27.177.113)' can't be establ
ished.ED25519 key fingerprint is SHA256:+DDD333vVVVuJJJbbbssS/zLLL000MMMHdk
dkvCqqqU.This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
The authenticity of host 'github.com (20.27.177.113)' can't be establ
ished.
ホスト'github.com'の信頼性が確認できません。
ished.ホスト'github.com'の信頼性が確認できません。
fingerprintと入力しEnterを押します。
? fingerprint
Please type 'yes', 'no' or the fingerprint: yes
Warning: Permanently added 'github.com' (ED25519) to the list of know
n hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Please type 'yes', 'no' or the fingerprint: yes
Warning: Permanently added 'github.com' (ED25519) to the list of know
n hosts.git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Ubuntuで試してみたところエラーは出ませんでした。
ymlibadmin@DESKTOP:~$ cd /mnt/c/git-work/
ymlibadmin@DESKTOP:/mnt/c/git-work$ git push -u origin main
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 16 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (9/9), 881 bytes | 46.00 KiB/s, done.
Total 9 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:ymlib32/git-work.git
* [new branch] main -> main
branch 'main' set up to track 'origin/main'.
ymlibadmin@DESKTOP:/mnt/c/git-work$
ymlibadmin@DESKTOP:/mnt/c/git-work$ git push -u origin main
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 16 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (9/9), 881 bytes | 46.00 KiB/s, done.
Total 9 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:ymlib32/git-work.git
* [new branch] main -> main
branch 'main' set up to track 'origin/main'.
ymlibadmin@DESKTOP:/mnt/c/git-work$
GitHubのページをリロードしたところファイルが表示されました!

期待通りに動作しました。
Copyright (C) 2025 ymlib.com
