LoginSignup
4
1

More than 5 years have passed since last update.

Debian unstable の Gnome 環境で git-credential-gnome-keyring を使う

Last updated at Posted at 2017-01-31

概要

Debian unstable の環境で、httpsでcloneしたレポジトリのパスワードの入力が毎回あるので
なんとかなるか調べたら、以下の記事が見つかった。

cacheでことが足りそうだなと思ったのですが、
せっかくなので、Gnomeのkeyringを使ってみようとした。

結論

できた

やったこと

まずは、上のサイトを参考に、以下を見る。

さらに読むと、Debianでは、すでにソースなどは入っているようだ。

ユーザーで、適当なディレクトリを作り、そこへ移動

cp -r /usr/share/doc/git/contrib/credential/gnome-keyring .

とりあぜず、

make

エラーがでた

Package gnome-keyring-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnome-keyring-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gnome-keyring-1' found
Package gnome-keyring-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnome-keyring-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gnome-keyring-1' found
gcc -g -O2 -Wall   -o git-credential-gnome-keyring.o -c git-credential-gnome-keyring.c
git-credential-gnome-keyring.c:29:18: fatal error: glib.h: No such file or directory
 #include <glib.h>
                  ^
compilation terminated.
Makefile:19: recipe for target 'git-credential-gnome-keyring.o' failed
make: *** [git-credential-gnome-keyring.o] Error 1

glib.h
がない

を参考に

apt-get install libgnome-keyring-dev

再び

make

できあがった git-credential-gnome-keyring
PATHが通っているところにコピーする

設定

.gitconfig を編集するなどする。

上の github のところだと、gnomekeyring となっているが、gnome-keyring にしないと自分のDebianの環境では動かなかった。

[credential]
        helper = gnome-keyring

あとは

参考情報

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1