2012年12月18日火曜日
【GitHub】CentOS5.5でgitHubのリポジトリにpushした時、SSL認証エラー発生
<★現象1>
SSH公開鍵作成、リポジトリ作成して、CentOS5.5の環境から
「git push origin master」しようとすると、SSL認証エラー発生
error: error setting certificate verify locations:
CAfile: /bin/curl-ca-bundle.crt
CApath: none
--------------------
【対応】
(1)CentOSのca-bundle.crt を最新のものに置き換える
$ sudo cp -p /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.crt.bak
$ sudo curl http://curl.haxx.se/ca/cacert.pem -o /etc/pki/tls/certs/ca-bundle.crt
(2)git config --global で、ca-bundle.crt の参照先を指定する
$ sudo git config --global http.sslcainfo /etc/pki/tls/certs/ca-bundle.crt
(参考)
http://d.hatena.ne.jp/takayuki_goto/20110622/p1
http://www.goodpic.com/mt/archives2/2011/02/github_clonessl.html
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<★現象2>
上記1の対応後、「git push origin master」でgithHubのログイン、パスワード入力すると、
今度はHTTPリクエストエラーが発生
error: The requested URL returned error: 403 while accessing
https://github.com/yadamada/test_yadamada.git/info/refs
fatal: HTTP request failed
--------------------
【対応】
SSHの公開キー未設定の場合は設定する
(参考)
http://yachi-googleblogyachiyo.blogspot.jp/2012/12/githubssh.html
/git/cconfig のurl を、https → ssh に書き換える(httpではなく、SSHで送信するよう設定)
# vi .git/config
(変更前) url = https://github.com/username/test_repojitory.git
(変更後) url = ssh://git@github.com/username/test_repojitory.git
(参考)
http://stackoverflow.com/questions/7438313/pushing-to-git-returning-error-code-403-fatal-http-request-failed
上記(1)(2)の対処を行った後、「git push origin master」 すると、SSHの認証確認になるので
SSHのPassphrase を入力
>>>>>>>>>
Enter passphrase for key '/home/username/.ssh/id_rsa':
Counting objects: 3, done.
Writing objects: 100% (3/3), 215 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To ssh://git@github.com/username/test_repojitory.git
* [new branch] master -> master
>>>>>>>>>
→ push 成功!
【GitHub】SSH公開キー&リポジトリ作成手順
gitHubのアカウントを作成後、SSH公開鍵を作成し、リポジトリを登録、pushするまでの手順
(環境:CentOS5.5)
(1) https://github.com/ にSign In
(2) SSH公開鍵作成
・CentOS環境にTeraTermで入って
ssh-keygen
・「Enter file in which to save the key (/Users/machida/.ssh/id_rsa): 」と
表示されるので、Enterキー押す
・「Enter passphrase (empty for no passphrase):」と表示されたら、
SSH用のパスフレーズを決めて入力(確認出るのでもう一度入力)
→下記の場所に公開鍵(id_rsa.pub)と秘密鍵(id_rsa)が作成される
$HOME/.ssh/
(3) 作成したSSH公開鍵をGitHubのアカウントに設定する
・https://github.com/ の右上「Account Setting」アイコンクリック
・左側のメニューから「SSH Keys」選択
・「Add SSH Key」をクリック
タイトル:鍵のタイトル(適当に決める)
キー:公開鍵(id_rsa.pub)の内容を丸ごとコピー&貼り付け
→キーの下の「Add Key」クリックで保存
(4)リポジトリの作成
・ https://github.com/ の右上「Create a New Repo」アイコンクリック
・リポジトリ名、説明(Description)を記入
(Public / Private の選択あるが、無料の場合はPublic のみ可)
→「Create Repository」クリックでリポジトリ作成
(5)GitHubのヘルプ(https://help.github.com/articles/create-a-repo)
を参考に、CentOS環境にリポジトリフォルダ & READMEファイルを作成
$ mkdir [フォルダ名]
$ cd [フォルダ名]
$ git init
$ touch README
(6)READMEファイルをgit add /git commit する
(READMEの中身は空でよい)
git add README
git commit -m 'firast commit'
(7)READMEファイルをgit push する
$ git remote add origin https://github.com/[username]/[リポジトリ名].git
(例: git remote add origin https://github.com/yadamada/test_yadamada.git)
$ git push origin master
→ SSHの認証エラー等発生するので、以下の方法で対処
【GitHub】CentOS5.5でgitHubのリポジトリにpushした時、SSL認証エラー発生
http://yachi-googleblogyachiyo.blogspot.jp/2012/12/githubcentos55githubpushssl.html
(8) https://github.com/ で、作成したリポジトリの「Code」クリックし、
READMEファイルが登録されていることを確認
2012年12月14日金曜日
【Open Office3.0】BaseデータをCalcに貼り付けると文字化けする
Open Office3.0 で、Baseデータを表示させて、Calcにコピー&貼り付けると文字化けする
【対応】
Calcをあらかじめ表示しておき、Baseのテーブルアイコンをドラッグ&ドロップすると
文字化けせずに内容貼り付けできる
(参考)
http://forum.openoffice.org/ja/forum/viewtopic.php?f=16&t=209
【対応】
Calcをあらかじめ表示しておき、Baseのテーブルアイコンをドラッグ&ドロップすると
文字化けせずに内容貼り付けできる
(参考)
http://forum.openoffice.org/ja/forum/viewtopic.php?f=16&t=209
登録:
投稿 (Atom)