teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

4

Add new answer

2020/08/09 07:32

投稿

y_shinoda
y_shinoda

スコア3272

answer CHANGED
@@ -97,4 +97,16 @@
97
97
 
98
98
  ```console
99
99
  Are you sure you want to continue connecting (yes/no/[fingerprint])?
100
- ```
100
+ ```
101
+
102
+ ```console
103
+ Requested runtime (python-3.8) is not available for this stack (heroku-18)
104
+ ```
105
+
106
+ runtime.txt には Heroku の Dyno がサポートしている Python バージョンを指定します:
107
+
108
+ ```text
109
+ python-3.8.5
110
+ ```
111
+
112
+ 参考: [Supported runtimes | Heroku Python Support | Heroku Dev Center](https://devcenter.heroku.com/articles/python-support#supported-runtimes)

3

Add fourth expression

2020/08/09 07:32

投稿

y_shinoda
y_shinoda

スコア3272

answer CHANGED
@@ -69,4 +69,32 @@
69
69
 
70
70
  VisualStudioCode:
71
71
 
72
- - [Git Graph - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph)
72
+ - [Git Graph - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph)
73
+
74
+ ```console
75
+ $ git commit -am "make it better"
76
+ [master (root-commit) 460db2b] make it better
77
+ 4 files changed, 45 insertions(+)
78
+ create mode 100644 Procfile
79
+ create mode 100644 main.py
80
+ create mode 100644 requirements.txt
81
+ create mode 100644 runtime.txt
82
+
83
+ $ git push heroku master
84
+ The authenticity of host 'heroku.com (50.19.85.156)' can't be established.
85
+ RSA key fingerprint is SHA256:8tF0wX2WquK45aGKs/Bh1dKmBXH08vxUe0VCJJWOA/o.
86
+ Are you sure you want to continue connecting (yes/no/[fingerprint])?
87
+ Host key verification failed.
88
+ fatal: Could not read from remote repository.
89
+
90
+ Please make sure you have the correct access rights
91
+ and the repository exists.
92
+ ```
93
+
94
+ commit には成功していますが、push に失敗しています
95
+
96
+ 次のメッセージが表示されたときに `yes` と入力します
97
+
98
+ ```console
99
+ Are you sure you want to continue connecting (yes/no/[fingerprint])?
100
+ ```

2

Add third expression

2020/08/08 17:00

投稿

y_shinoda
y_shinoda

スコア3272

answer CHANGED
@@ -26,4 +26,47 @@
26
26
  ```
27
27
 
28
28
  上記のような状態であれば、やはり `commit` がなされていないことが原因です
29
+
30
+ ```console
29
- `git commit` を実行したときにエラーメッセージが表示されていませんか?
31
+ git commit -am "make it better"
32
+
33
+ *** Please tell me who you are.
34
+
35
+ Run
36
+
37
+ git config --global user.email "you@example.com"
38
+ git config --global user.name "Your Name"
39
+
40
+ to set your account's default identity.
41
+ Omit --global to set the identity only in this repository.
42
+
43
+ fatal: unable to auto-detect email address (got 'masakazu@DESKTOP-D231TSH.(none)')
44
+
45
+ C:\Users\masakazu\Desktop\line-bot-test>
46
+ ```
47
+
48
+ 上記のメッセージにある通り、
49
+ まずメールアドレスとユーザー名を設定する必要があります:
50
+
51
+ ```console
52
+ git config --global user.email "you@example.com"
53
+ git config --global user.name "Your Name"
54
+ ```
55
+
56
+ コマンドラインでは不要なメッセージも多く表示されますが、
57
+ うまく動いていないと感じたら、メッセージを確認してみましょう
58
+ 特に、Git に関しては
59
+ おかしいと思ったら `git status` コマンドを実行すれば
60
+ 大体原因がわかります
61
+
62
+ または GUI ツールを使いましょう:
63
+
64
+ TOrtoiseGit:
65
+
66
+ - [どうやって Windows にGit をインストールしたらいいの? | ultra code](https://futureys.tokyo/how-should-i-install-git-on-windows/)
67
+ - [どうやって TortoiseGit を日本語化したらいいの? | ultra code](https://futureys.tokyo/how-should-i-translate-tortoisegit-in-japanese/)
68
+ - [Windows で Git を使いはじめる前に最低限しておいた方がいい設定まとめ | ultra code](https://futureys.tokyo/summary-of-settings-which-should-be-done-at-least-before-using-git-on-windows/)
69
+
70
+ VisualStudioCode:
71
+
72
+ - [Git Graph - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph)

1

Add expression

2020/08/08 16:36

投稿

y_shinoda
y_shinoda

スコア3272

answer CHANGED
@@ -1,3 +1,29 @@
1
+ ## 元の回答
2
+
1
3
  `git commit` を忘れていませんか?
2
4
 
3
- 参考: [Answer: Message 'src refspec master does not match any' when pushing commits in Git](https://stackoverflow.com/a/7572252/12721873?stw=2)
5
+ 参考: [Answer: Message 'src refspec master does not match any' when pushing commits in Git](https://stackoverflow.com/a/7572252/12721873?stw=2)
6
+
7
+ ## 追記
8
+
9
+ ```console
10
+ $ git status
11
+
12
+ On branch master
13
+
14
+ No commits yet
15
+
16
+ Changes to be committed:
17
+ (use ''git rm --cached<file>...''to unstage)
18
+ new file: Procfile
19
+ new file: main.py
20
+ new file: requirements.txt
21
+ new file: runtime.txt
22
+
23
+ $ git log
24
+
25
+ fatal:your current branch 'master' dose not have any commits yet
26
+ ```
27
+
28
+ 上記のような状態であれば、やはり `commit` がなされていないことが原因です
29
+ `git commit` を実行したときにエラーメッセージが表示されていませんか?