travis CIが走った!走ったぞ!!!(じょばー pic.twitter.com/QzvPtG2yeP
— Nao Tsukuba Tomori つくばの友利奈緒 (@takuzirra) July 18, 2018
参考:
参考通り進めて、git pushしようとしたら
[chino@kafu cpp-test-travis-ci]$git push -u origin master
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.
permissionがおかしいとでるので、ssh keyを登録し直した。
参考:
それでsshの接続テストは成功したけど、あいかわらずgit pushが通らない。。。
[chino@kafu cpp-test-travis-ci]$ssh -i ~/.ssh/id_rsa_github git@github.com
Enter passphrase for key '/Users/chino/.ssh/id_rsa_github':
PTY allocation request failed on channel 0
Hi takurx! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
[chino@kafu cpp-test-travis-ci]$git push -u origin master
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.
は成功したけど、あいかわらずgit pushが通らない。。。
エラーでぐぐったら、ssh-addコマンドを使えば良いとのことでやったところできるようになった。
参考:
[chino@kafu cpp-test-travis-ci]$ssh-add /Users/chino/.ssh/id_rsa_github
Enter passphrase for /Users/chino/.ssh/id_rsa_github:
Identity added: /Users/chino/.ssh/id_rsa_github (/Users/chino/.ssh/id_rsa_github)
[chino@kafu cpp-test-travis-ci]$git push -u origin master
Counting objects: 8, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (8/8), 799 bytes | 399.00 KiB/s, done.
Total 8 (delta 0), reused 0 (delta 0)
To github.com:takurx/cpp-test-travis-ci.git
* [new branch] master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.
ssh key指定のsshも試したけど、これはだめだったわ。
github に SSH key を登録しても Permission denied (publickey) | Home Made Garbage
[chino@kafu cpp-test-travis-ci]$ssh -i ~/.ssh/id_rsa_github git@github.com
Enter passphrase for key '/Users/chino/.ssh/id_rsa_github':
PTY allocation request failed on channel 0
Hi takurx! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
[chino@kafu cpp-test-travis-ci]$git push -u origin master
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.
そして、Travis CIをwebから設定した。再度pushをかける。
Readme.mdを編集して、commitしてpushしたら、Travis CIが走った。
[chino@kafu cpp-test-travis-ci]$git commit -a
[master 1657762] trigger to push
1 file changed, 1 insertion(+)
[chino@kafu cpp-test-travis-ci]$git push origin master
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 330 bytes | 330.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To github.com:takurx/cpp-test-travis-ci.git
82de7d1..1657762 master -> master
以下だとpushできなかった。なんでだろ。後で調べる。
コマンドラインのgitは覚えないと。コマンドラインからの方が楽ではあるので。
[chino@kafu cpp-test-travis-ci]$git commit -m "trigger to push"
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
modified: README.md
no changes added to commit
[chino@kafu cpp-test-travis-ci]$git push -u origin master
Branch 'master' set up to track remote branch 'master' from 'origin'.
Everything up-to-date
追記:バッチのリンク入れるのを忘れてた。
バッジを貼る
設定が出来てテストなどを行えたら結果の表示をしたいわけですが、 バッジはTravis CIにある各レポジトリの右上のバッジ部分をクリックすると バッジのURLなどが出てきます 9。
つけまーつけまー。付けました。 pic.twitter.com/bXHSsEmcw0
— Nao Tsukuba Tomori つくばの友利奈緒 (@takuzirra) July 19, 2018