Initialized empty Git repository in /home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.git/ expecting success: check fill $HELPER <<-\EOF protocol=https host=example.com -- protocol=https host=example.com username=askpass-username password=askpass-password -- askpass: Username for 'https://example.com': askpass: Password for 'https://askpass-username@example.com': EOF ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=askpass-username ++ read line ++ case "$line" in ++ echo password=askpass-password ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo 'askpass: Username for '\''https://example.com'\'':' ++ read line ++ case "$line" in ++ echo 'askpass: Password for '\''https://askpass-username@example.com'\'':' ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 1 - helper (cache) has no existing data expecting success: check approve $HELPER <<-\EOF protocol=https host=example.com username=store-user password=store-pass EOF ++ check approve cache ++ credential_opts= ++ credential_cmd=approve ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=store-user ++ read line ++ case "$line" in ++ echo password=store-pass ++ read line ++ read_chunk ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential approve stdout 2>stderr' +++ git -c credential.helper=cache credential approve ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 2 - helper (cache) stores password expecting success: check fill $HELPER <<-\EOF protocol=https host=example.com -- protocol=https host=example.com username=store-user password=store-pass -- EOF ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=store-user ++ read line ++ case "$line" in ++ echo password=store-pass ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 3 - helper (cache) can retrieve password expecting success: check fill $HELPER <<-\EOF protocol=http host=example.com -- protocol=http host=example.com username=askpass-username password=askpass-password -- askpass: Username for 'http://example.com': askpass: Password for 'http://askpass-username@example.com': EOF ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=http ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=http ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=askpass-username ++ read line ++ case "$line" in ++ echo password=askpass-password ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo 'askpass: Username for '\''http://example.com'\'':' ++ read line ++ case "$line" in ++ echo 'askpass: Password for '\''http://askpass-username@example.com'\'':' ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 4 - helper (cache) requires matching protocol expecting success: check fill $HELPER <<-\EOF protocol=https host=other.tld -- protocol=https host=other.tld username=askpass-username password=askpass-password -- askpass: Username for 'https://other.tld': askpass: Password for 'https://askpass-username@other.tld': EOF ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=other.tld ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=other.tld ++ read line ++ case "$line" in ++ echo username=askpass-username ++ read line ++ case "$line" in ++ echo password=askpass-password ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo 'askpass: Username for '\''https://other.tld'\'':' ++ read line ++ case "$line" in ++ echo 'askpass: Password for '\''https://askpass-username@other.tld'\'':' ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 5 - helper (cache) requires matching host expecting success: check fill $HELPER <<-\EOF protocol=https host=example.com username=other -- protocol=https host=example.com username=other password=askpass-password -- askpass: Password for 'https://other@example.com': EOF ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=other ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=other ++ read line ++ case "$line" in ++ echo password=askpass-password ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo 'askpass: Password for '\''https://other@example.com'\'':' ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 6 - helper (cache) requires matching username expecting success: test_config credential.usehttppath true && check approve $HELPER <<-\EOF && protocol=http host=path.tld path=foo.git username=user password=pass EOF check fill $HELPER <<-\EOF protocol=http host=path.tld path=bar.git -- protocol=http host=path.tld path=bar.git username=askpass-username password=askpass-password -- askpass: Username for 'http://path.tld/bar.git': askpass: Password for 'http://askpass-username@path.tld/bar.git': EOF ++ test_config credential.usehttppath true ++ config_dir= ++ test credential.usehttppath = -C ++ test_when_finished 'test_unconfig '\''credential.usehttppath'\''' ++ test 0 = 0 ++ test_cleanup='{ test_unconfig '\''credential.usehttppath'\'' } && (exit "$eval_ret"); eval_ret=$?; :' ++ git config credential.usehttppath true ++ check approve cache ++ credential_opts= ++ credential_cmd=approve ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=http ++ read line ++ case "$line" in ++ echo host=path.tld ++ read line ++ case "$line" in ++ echo path=foo.git ++ read line ++ case "$line" in ++ echo username=user ++ read line ++ case "$line" in ++ echo password=pass ++ read line ++ read_chunk ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential approve stdout 2>stderr' +++ git -c credential.helper=cache credential approve ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=http ++ read line ++ case "$line" in ++ echo host=path.tld ++ read line ++ case "$line" in ++ echo path=bar.git ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=http ++ read line ++ case "$line" in ++ echo host=path.tld ++ read line ++ case "$line" in ++ echo path=bar.git ++ read line ++ case "$line" in ++ echo username=askpass-username ++ read line ++ case "$line" in ++ echo password=askpass-password ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo 'askpass: Username for '\''http://path.tld/bar.git'\'':' ++ read line ++ case "$line" in ++ echo 'askpass: Password for '\''http://askpass-username@path.tld/bar.git'\'':' ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ++ test_unconfig credential.usehttppath ++ config_dir= ++ test credential.usehttppath = -C ++ git config --unset-all credential.usehttppath ++ config_status=0 ++ case "$config_status" in ++ return 0 ++ exit 0 ++ eval_ret=0 ++ : + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 7 - helper (cache) requires matching path expecting success: check reject $HELPER <<-\EOF && protocol=https host=example.com EOF check fill $HELPER <<-\EOF protocol=https host=example.com -- protocol=https host=example.com username=askpass-username password=askpass-password -- askpass: Username for 'https://example.com': askpass: Password for 'https://askpass-username@example.com': EOF ++ check reject cache ++ credential_opts= ++ credential_cmd=reject ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ read_chunk ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential reject stdout 2>stderr' +++ git -c credential.helper=cache credential reject ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=askpass-username ++ read line ++ case "$line" in ++ echo password=askpass-password ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo 'askpass: Username for '\''https://example.com'\'':' ++ read line ++ case "$line" in ++ echo 'askpass: Password for '\''https://askpass-username@example.com'\'':' ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 8 - helper (cache) can forget host expecting success: check approve $HELPER <<-\EOF && protocol=https host=example.com username=user1 password=pass1 EOF check approve $HELPER <<-\EOF && protocol=https host=example.com username=user2 password=pass2 EOF check fill $HELPER <<-\EOF && protocol=https host=example.com username=user1 -- protocol=https host=example.com username=user1 password=pass1 EOF check fill $HELPER <<-\EOF protocol=https host=example.com username=user2 -- protocol=https host=example.com username=user2 password=pass2 EOF ++ check approve cache ++ credential_opts= ++ credential_cmd=approve ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user1 ++ read line ++ case "$line" in ++ echo password=pass1 ++ read line ++ read_chunk ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential approve stdout 2>stderr' +++ git -c credential.helper=cache credential approve ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr ++ check approve cache ++ credential_opts= ++ credential_cmd=approve ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user2 ++ read line ++ case "$line" in ++ echo password=pass2 ++ read line ++ read_chunk ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential approve stdout 2>stderr' +++ git -c credential.helper=cache credential approve ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user1 ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user1 ++ read line ++ case "$line" in ++ echo password=pass1 ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user2 ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user2 ++ read line ++ case "$line" in ++ echo password=pass2 ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 9 - helper (cache) can store multiple users expecting success: check reject $HELPER <<-\EOF && protocol=https host=example.com username=user1 EOF check fill $HELPER <<-\EOF protocol=https host=example.com username=user1 -- protocol=https host=example.com username=user1 password=askpass-password -- askpass: Password for 'https://user1@example.com': EOF ++ check reject cache ++ credential_opts= ++ credential_cmd=reject ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user1 ++ read line ++ read_chunk ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential reject stdout 2>stderr' +++ git -c credential.helper=cache credential reject ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user1 ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user1 ++ read line ++ case "$line" in ++ echo password=askpass-password ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo 'askpass: Password for '\''https://user1@example.com'\'':' ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 10 - helper (cache) can forget user expecting success: check fill $HELPER <<-\EOF protocol=https host=example.com username=user2 -- protocol=https host=example.com username=user2 password=pass2 EOF ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user2 ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user2 ++ read line ++ case "$line" in ++ echo password=pass2 ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 11 - helper (cache) remembers other user expecting success: test_when_finished " git credential-cache exit && rmdir -p .cache/git/credential/ " && test_path_is_missing "$HOME/.git-credential-cache" && test -S "$HOME/.cache/git/credential/socket" ++ test_when_finished ' git credential-cache exit && rmdir -p .cache/git/credential/ ' ++ test 0 = 0 ++ test_cleanup='{ git credential-cache exit && rmdir -p .cache/git/credential/ } && (exit "$eval_ret"); eval_ret=$?; :' ++ test_path_is_missing '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.git-credential-cache' ++ test -e '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.git-credential-cache' ++ test -S '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.cache/git/credential/socket' + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ++ git credential-cache exit fatal: read error from cache daemon: Connection reset by peer ++ eval_ret=128 ++ : + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x not ok 12 - socket defaults to ~/.cache/git/credential/socket # # test_when_finished " # git credential-cache exit && # rmdir -p .cache/git/credential/ # " && # test_path_is_missing "$HOME/.git-credential-cache" && # test -S "$HOME/.cache/git/credential/socket" # expecting success: check fill $HELPER <<-\EOF protocol=https host=example.com -- protocol=https host=example.com username=askpass-username password=askpass-password -- askpass: Username for 'https://example.com': askpass: Password for 'https://askpass-username@example.com': EOF ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=askpass-username ++ read line ++ case "$line" in ++ echo password=askpass-password ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo 'askpass: Username for '\''https://example.com'\'':' ++ read line ++ case "$line" in ++ echo 'askpass: Password for '\''https://askpass-username@example.com'\'':' ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 13 - helper (cache) has no existing data expecting success: check approve $HELPER <<-\EOF protocol=https host=example.com username=store-user password=store-pass EOF ++ check approve cache ++ credential_opts= ++ credential_cmd=approve ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=store-user ++ read line ++ case "$line" in ++ echo password=store-pass ++ read line ++ read_chunk ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential approve stdout 2>stderr' +++ git -c credential.helper=cache credential approve ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 14 - helper (cache) stores password expecting success: check fill $HELPER <<-\EOF protocol=https host=example.com -- protocol=https host=example.com username=store-user password=store-pass -- EOF ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=store-user ++ read line ++ case "$line" in ++ echo password=store-pass ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 15 - helper (cache) can retrieve password expecting success: check fill $HELPER <<-\EOF protocol=http host=example.com -- protocol=http host=example.com username=askpass-username password=askpass-password -- askpass: Username for 'http://example.com': askpass: Password for 'http://askpass-username@example.com': EOF ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=http ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=http ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=askpass-username ++ read line ++ case "$line" in ++ echo password=askpass-password ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo 'askpass: Username for '\''http://example.com'\'':' ++ read line ++ case "$line" in ++ echo 'askpass: Password for '\''http://askpass-username@example.com'\'':' ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 16 - helper (cache) requires matching protocol expecting success: check fill $HELPER <<-\EOF protocol=https host=other.tld -- protocol=https host=other.tld username=askpass-username password=askpass-password -- askpass: Username for 'https://other.tld': askpass: Password for 'https://askpass-username@other.tld': EOF ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=other.tld ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=other.tld ++ read line ++ case "$line" in ++ echo username=askpass-username ++ read line ++ case "$line" in ++ echo password=askpass-password ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo 'askpass: Username for '\''https://other.tld'\'':' ++ read line ++ case "$line" in ++ echo 'askpass: Password for '\''https://askpass-username@other.tld'\'':' ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 17 - helper (cache) requires matching host expecting success: check fill $HELPER <<-\EOF protocol=https host=example.com username=other -- protocol=https host=example.com username=other password=askpass-password -- askpass: Password for 'https://other@example.com': EOF ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=other ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=other ++ read line ++ case "$line" in ++ echo password=askpass-password ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo 'askpass: Password for '\''https://other@example.com'\'':' ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 18 - helper (cache) requires matching username expecting success: test_config credential.usehttppath true && check approve $HELPER <<-\EOF && protocol=http host=path.tld path=foo.git username=user password=pass EOF check fill $HELPER <<-\EOF protocol=http host=path.tld path=bar.git -- protocol=http host=path.tld path=bar.git username=askpass-username password=askpass-password -- askpass: Username for 'http://path.tld/bar.git': askpass: Password for 'http://askpass-username@path.tld/bar.git': EOF ++ test_config credential.usehttppath true ++ config_dir= ++ test credential.usehttppath = -C ++ test_when_finished 'test_unconfig '\''credential.usehttppath'\''' ++ test 0 = 0 ++ test_cleanup='{ test_unconfig '\''credential.usehttppath'\'' } && (exit "$eval_ret"); eval_ret=$?; :' ++ git config credential.usehttppath true ++ check approve cache ++ credential_opts= ++ credential_cmd=approve ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=http ++ read line ++ case "$line" in ++ echo host=path.tld ++ read line ++ case "$line" in ++ echo path=foo.git ++ read line ++ case "$line" in ++ echo username=user ++ read line ++ case "$line" in ++ echo password=pass ++ read line ++ read_chunk ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential approve stdout 2>stderr' +++ git -c credential.helper=cache credential approve ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=http ++ read line ++ case "$line" in ++ echo host=path.tld ++ read line ++ case "$line" in ++ echo path=bar.git ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=http ++ read line ++ case "$line" in ++ echo host=path.tld ++ read line ++ case "$line" in ++ echo path=bar.git ++ read line ++ case "$line" in ++ echo username=askpass-username ++ read line ++ case "$line" in ++ echo password=askpass-password ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo 'askpass: Username for '\''http://path.tld/bar.git'\'':' ++ read line ++ case "$line" in ++ echo 'askpass: Password for '\''http://askpass-username@path.tld/bar.git'\'':' ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ++ test_unconfig credential.usehttppath ++ config_dir= ++ test credential.usehttppath = -C ++ git config --unset-all credential.usehttppath ++ config_status=0 ++ case "$config_status" in ++ return 0 ++ exit 0 ++ eval_ret=0 ++ : + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 19 - helper (cache) requires matching path expecting success: check reject $HELPER <<-\EOF && protocol=https host=example.com EOF check fill $HELPER <<-\EOF protocol=https host=example.com -- protocol=https host=example.com username=askpass-username password=askpass-password -- askpass: Username for 'https://example.com': askpass: Password for 'https://askpass-username@example.com': EOF ++ check reject cache ++ credential_opts= ++ credential_cmd=reject ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ read_chunk ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential reject stdout 2>stderr' +++ git -c credential.helper=cache credential reject ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=askpass-username ++ read line ++ case "$line" in ++ echo password=askpass-password ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo 'askpass: Username for '\''https://example.com'\'':' ++ read line ++ case "$line" in ++ echo 'askpass: Password for '\''https://askpass-username@example.com'\'':' ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 20 - helper (cache) can forget host expecting success: check approve $HELPER <<-\EOF && protocol=https host=example.com username=user1 password=pass1 EOF check approve $HELPER <<-\EOF && protocol=https host=example.com username=user2 password=pass2 EOF check fill $HELPER <<-\EOF && protocol=https host=example.com username=user1 -- protocol=https host=example.com username=user1 password=pass1 EOF check fill $HELPER <<-\EOF protocol=https host=example.com username=user2 -- protocol=https host=example.com username=user2 password=pass2 EOF ++ check approve cache ++ credential_opts= ++ credential_cmd=approve ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user1 ++ read line ++ case "$line" in ++ echo password=pass1 ++ read line ++ read_chunk ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential approve stdout 2>stderr' +++ git -c credential.helper=cache credential approve ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr ++ check approve cache ++ credential_opts= ++ credential_cmd=approve ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user2 ++ read line ++ case "$line" in ++ echo password=pass2 ++ read line ++ read_chunk ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential approve stdout 2>stderr' +++ git -c credential.helper=cache credential approve ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user1 ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user1 ++ read line ++ case "$line" in ++ echo password=pass1 ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user2 ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user2 ++ read line ++ case "$line" in ++ echo password=pass2 ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 21 - helper (cache) can store multiple users expecting success: check reject $HELPER <<-\EOF && protocol=https host=example.com username=user1 EOF check fill $HELPER <<-\EOF protocol=https host=example.com username=user1 -- protocol=https host=example.com username=user1 password=askpass-password -- askpass: Password for 'https://user1@example.com': EOF ++ check reject cache ++ credential_opts= ++ credential_cmd=reject ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user1 ++ read line ++ read_chunk ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential reject stdout 2>stderr' +++ git -c credential.helper=cache credential reject ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user1 ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user1 ++ read line ++ case "$line" in ++ echo password=askpass-password ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo 'askpass: Password for '\''https://user1@example.com'\'':' ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 22 - helper (cache) can forget user expecting success: check fill $HELPER <<-\EOF protocol=https host=example.com username=user2 -- protocol=https host=example.com username=user2 password=pass2 EOF ++ check fill cache ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user2 ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=user2 ++ read line ++ case "$line" in ++ echo password=pass2 ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential fill stdout 2>stderr' +++ git -c credential.helper=cache credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 23 - helper (cache) remembers other user expecting success: test_when_finished "git credential-cache exit" && test -S "$XDG_CACHE_HOME/git/credential/socket" && test_path_is_missing "$HOME/.git-credential-cache/socket" && test_path_is_missing "$HOME/.cache/git/credential/socket" ++ test_when_finished 'git credential-cache exit' ++ test 0 = 0 ++ test_cleanup='{ git credential-cache exit } && (exit "$eval_ret"); eval_ret=$?; :' ++ test -S '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/xdg/git/credential/socket' ++ test_path_is_missing '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.git-credential-cache/socket' ++ test -e '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.git-credential-cache/socket' ++ test_path_is_missing '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.cache/git/credential/socket' ++ test -e '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.cache/git/credential/socket' + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ++ git credential-cache exit fatal: read error from cache daemon: Connection reset by peer ++ eval_ret=128 ++ : + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x not ok 24 - use custom XDG_CACHE_HOME if set and default sockets are not created # # test_when_finished "git credential-cache exit" && # test -S "$XDG_CACHE_HOME/git/credential/socket" && # test_path_is_missing "$HOME/.git-credential-cache/socket" && # test_path_is_missing "$HOME/.cache/git/credential/socket" # expecting success: test_when_finished " git credential-cache exit --socket \"\$HOME/dir/socket\" && rmdir \"\$HOME/dir\" " && check approve "cache --socket \"\$HOME/dir/socket\"" <<-\EOF && protocol=https host=example.com username=store-user password=store-pass EOF test -S "$HOME/dir/socket" ++ test_when_finished ' git credential-cache exit --socket "$HOME/dir/socket" && rmdir "$HOME/dir" ' ++ test 0 = 0 ++ test_cleanup='{ git credential-cache exit --socket "$HOME/dir/socket" && rmdir "$HOME/dir" } && (exit "$eval_ret"); eval_ret=$?; :' ++ check approve 'cache --socket "$HOME/dir/socket"' ++ credential_opts= ++ credential_cmd=approve ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache --socket "$HOME/dir/socket"'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=store-user ++ read line ++ case "$line" in ++ echo password=store-pass ++ read line ++ read_chunk ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache --socket "$HOME/dir/socket"'\'' credential approve stdout 2>stderr' +++ git -c 'credential.helper=cache --socket "$HOME/dir/socket"' credential approve ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr ++ test -S '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/dir/socket' + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ++ git credential-cache exit --socket '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/dir/socket' fatal: read error from cache daemon: Connection reset by peer ++ eval_ret=128 ++ : + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x not ok 25 - credential-cache --socket option overrides default location # # test_when_finished " # git credential-cache exit --socket \"\$HOME/dir/socket\" && # rmdir \"\$HOME/dir\" # " && # check approve "cache --socket \"\$HOME/dir/socket\"" <<-\EOF && # protocol=https # host=example.com # username=store-user # password=store-pass # EOF # test -S "$HOME/dir/socket" # expecting success: test_when_finished " git credential-cache exit && sane_unset XDG_CACHE_HOME " && check approve cache <<-\EOF && protocol=https host=example.com username=store-user password=store-pass EOF test -S "$HOME/.cache/git/credential/socket" && XDG_CACHE_HOME="$HOME/xdg" && export XDG_CACHE_HOME && check approve cache <<-\EOF && protocol=https host=example.com username=store-user password=store-pass EOF test -S "$XDG_CACHE_HOME/git/credential/socket" ++ test_when_finished ' git credential-cache exit && sane_unset XDG_CACHE_HOME ' ++ test 0 = 0 ++ test_cleanup='{ git credential-cache exit && sane_unset XDG_CACHE_HOME } && (exit "$eval_ret"); eval_ret=$?; :' ++ check approve cache ++ credential_opts= ++ credential_cmd=approve ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=store-user ++ read line ++ case "$line" in ++ echo password=store-pass ++ read line ++ read_chunk ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential approve stdout 2>stderr' +++ git -c credential.helper=cache credential approve ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr ++ test -S '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.cache/git/credential/socket' ++ XDG_CACHE_HOME='/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/xdg' ++ export XDG_CACHE_HOME ++ check approve cache ++ credential_opts= ++ credential_cmd=approve ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=store-user ++ read line ++ case "$line" in ++ echo password=store-pass ++ read line ++ read_chunk ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential approve stdout 2>stderr' +++ git -c credential.helper=cache credential approve ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr ++ test -S '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/xdg/git/credential/socket' + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ++ git credential-cache exit fatal: read error from cache daemon: Connection reset by peer ++ eval_ret=128 ++ : + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x not ok 26 - use custom XDG_CACHE_HOME even if xdg socket exists # # test_when_finished " # git credential-cache exit && # sane_unset XDG_CACHE_HOME # " && # check approve cache <<-\EOF && # protocol=https # host=example.com # username=store-user # password=store-pass # EOF # test -S "$HOME/.cache/git/credential/socket" && # XDG_CACHE_HOME="$HOME/xdg" && # export XDG_CACHE_HOME && # check approve cache <<-\EOF && # protocol=https # host=example.com # username=store-user # password=store-pass # EOF # test -S "$XDG_CACHE_HOME/git/credential/socket" # expecting success: test_when_finished " git credential-cache exit && rmdir \"\$HOME/.git-credential-cache/\" " && mkdir -p -m 700 "$HOME/.git-credential-cache/" && check approve cache <<-\EOF && protocol=https host=example.com username=store-user password=store-pass EOF test -S "$HOME/.git-credential-cache/socket" ++ test_when_finished ' git credential-cache exit && rmdir "$HOME/.git-credential-cache/" ' ++ test 0 = 0 ++ test_cleanup='{ git credential-cache exit && rmdir "$HOME/.git-credential-cache/" } && (exit "$eval_ret"); eval_ret=$?; :' ++ mkdir -p -m 700 '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.git-credential-cache/' ++ check approve cache ++ credential_opts= ++ credential_cmd=approve ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=store-user ++ read line ++ case "$line" in ++ echo password=store-pass ++ read line ++ read_chunk ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential approve stdout 2>stderr' +++ git -c credential.helper=cache credential approve ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr ++ test -S '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.git-credential-cache/socket' + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ++ git credential-cache exit fatal: read error from cache daemon: Connection reset by peer ++ eval_ret=128 ++ : + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x not ok 27 - use user socket if user directory exists # # test_when_finished " # git credential-cache exit && # rmdir \"\$HOME/.git-credential-cache/\" # " && # mkdir -p -m 700 "$HOME/.git-credential-cache/" && # check approve cache <<-\EOF && # protocol=https # host=example.com # username=store-user # password=store-pass # EOF # test -S "$HOME/.git-credential-cache/socket" # checking prerequisite: SYMLINKS mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" && ( cd "$TRASH_DIRECTORY/prereq-test-dir" && # test whether the filesystem supports symbolic links ln -s x y && test -h y ) ++ mkdir -p '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/prereq-test-dir' ++ cd '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/prereq-test-dir' ++ ln -s x y ++ test -h y + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x prerequisite SYMLINKS ok expecting success: test_when_finished " git credential-cache exit && rmdir \"\$HOME/dir/\" && rm \"\$HOME/.git-credential-cache\" " && mkdir -p -m 700 "$HOME/dir/" && ln -s "$HOME/dir" "$HOME/.git-credential-cache" && check approve cache <<-\EOF && protocol=https host=example.com username=store-user password=store-pass EOF test -S "$HOME/.git-credential-cache/socket" ++ test_when_finished ' git credential-cache exit && rmdir "$HOME/dir/" && rm "$HOME/.git-credential-cache" ' ++ test 0 = 0 ++ test_cleanup='{ git credential-cache exit && rmdir "$HOME/dir/" && rm "$HOME/.git-credential-cache" } && (exit "$eval_ret"); eval_ret=$?; :' ++ mkdir -p -m 700 '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/dir/' ++ ln -s '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/dir' '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.git-credential-cache' ++ check approve cache ++ credential_opts= ++ credential_cmd=approve ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=example.com ++ read line ++ case "$line" in ++ echo username=store-user ++ read line ++ case "$line" in ++ echo password=store-pass ++ read line ++ read_chunk ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache'\'' credential approve stdout 2>stderr' +++ git -c credential.helper=cache credential approve ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr ++ test -S '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.git-credential-cache/socket' + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ++ git credential-cache exit fatal: read error from cache daemon: Connection reset by peer ++ eval_ret=128 ++ : + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x not ok 28 - use user socket if user directory is a symlink to a directory # # test_when_finished " # git credential-cache exit && # rmdir \"\$HOME/dir/\" && # rm \"\$HOME/.git-credential-cache\" # " && # mkdir -p -m 700 "$HOME/dir/" && # ln -s "$HOME/dir" "$HOME/.git-credential-cache" && # check approve cache <<-\EOF && # protocol=https # host=example.com # username=store-user # password=store-pass # EOF # test -S "$HOME/.git-credential-cache/socket" # expecting success: check approve "$HELPER" <<-\EOF && protocol=https host=timeout.tld username=user password=pass EOF sleep 2 && check fill "$HELPER" <<-\EOF protocol=https host=timeout.tld -- protocol=https host=timeout.tld username=askpass-username password=askpass-password -- askpass: Username for 'https://timeout.tld': askpass: Password for 'https://askpass-username@timeout.tld': EOF ++ check approve 'cache --timeout=1' ++ credential_opts= ++ credential_cmd=approve ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache --timeout=1'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=timeout.tld ++ read line ++ case "$line" in ++ echo username=user ++ read line ++ case "$line" in ++ echo password=pass ++ read line ++ read_chunk ++ read line ++ read_chunk ++ read line ++ eval 'git -c credential.helper='\''cache --timeout=1'\'' credential approve stdout 2>stderr' +++ git -c 'credential.helper=cache --timeout=1' credential approve ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr ++ sleep 2 ++ check fill 'cache --timeout=1' ++ credential_opts= ++ credential_cmd=fill ++ shift ++ for arg in "$@" ++ credential_opts=' -c credential.helper='\''cache --timeout=1'\''' ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=timeout.tld ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo protocol=https ++ read line ++ case "$line" in ++ echo host=timeout.tld ++ read line ++ case "$line" in ++ echo username=askpass-username ++ read line ++ case "$line" in ++ echo password=askpass-password ++ read line ++ case "$line" in ++ break ++ read_chunk ++ read line ++ case "$line" in ++ echo 'askpass: Username for '\''https://timeout.tld'\'':' ++ read line ++ case "$line" in ++ echo 'askpass: Password for '\''https://askpass-username@timeout.tld'\'':' ++ read line ++ eval 'git -c credential.helper='\''cache --timeout=1'\'' credential fill stdout 2>stderr' +++ git -c 'credential.helper=cache --timeout=1' credential fill ++ test_cmp expect-stdout stdout ++ diff -u expect-stdout stdout ++ test_cmp expect-stderr stderr ++ diff -u expect-stderr stderr + test_eval_ret_=0 + want_trace + test t = t + test t = t + set +x ok 29 - helper (cache --timeout=1) times out fatal: read error from cache daemon: Connection reset by peer # failed 6 among 29 test(s) 1..29