リア充爆発日記

You don't even know what ria-ju really is.

error: The requested URL returned error: 401 while accessing https://github.com/hoge....

capistranoを使って[local]->[さくらのVPS]->[github]といったforward agentなdeployの仕組みを作ろうとしてタイトルのエラーが出た。

deploy.rbにhttpsなんかどこにも書いてねえよ、とかなりハマったけど答えはやっぱりカンタンなことだった。

[さくらのVPS]側でgit remote -vしてみろ!httpsってでてくるだろ!?

git remote -v
origin	https://github.com/xxx/xxx.git (fetch)
origin	https://github.com/xxx/xxx.git (push)

って感じだろ?

git remote rm origin
git remote add origin git@github.com:xxx/xxx.git 

これで解決よ!