-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrated to the new .NET based Git Credential Manager (#48)
This supersedes the old Java based Git Credential Manager for Mac and Linux.
- Loading branch information
Showing
24 changed files
with
58 additions
and
427 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
--- | ||
# Git Credential Manager version number | ||
git_credential_manager_version: '2.0.4' | ||
git_credential_manager_version: '2.0.632' | ||
|
||
# The SHA256 of the Git Credential Manager JAR | ||
git_credential_manager_jar_sha256sum: 'fb8536aac9b00cdf6bdeb0dd152bb1306d88cd3fdb7a958ac9a144bf4017cad7' | ||
|
||
# The major version of the JRE | ||
git_credential_manager_jre_major_version: '8' | ||
# Git Credential Manager build number | ||
git_credential_manager_build: '34631' | ||
|
||
# The full version of the JRE (from AdoptOpenJDK) | ||
git_credential_manager_jre_version: 'jdk8u282-b08_openj9-0.24.0' | ||
|
||
# The SHA256 of the JRE | ||
git_credential_manager_jre_sha256sum: '4fad259c32eb23ec98925c8b2cf28aaacbdb55e034db74c31a7636e75b6af08d' | ||
# The SHA256 of the Git Credential Manager JAR | ||
git_credential_manager_redis_sha256sum: '41d116b3e4b62099a41d7de21f815724cefa8d386af767695da8ef0ac8b4aa33' | ||
|
||
# Base installation directory the Git Credential Manager | ||
git_credential_manager_install_dir: '/opt/git-credential-manager/{{ git_credential_manager_version }}' | ||
# The credential store to use | ||
git_credential_manager_credential_store: 'secretservice' | ||
|
||
# Directory to store files downloaded for the Git Credential Manager | ||
git_credential_manager_download_dir: "{{ x_ansible_download_dir | default(ansible_env.HOME + '/.ansible/tmp/downloads') }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,15 @@ | ||
import pytest | ||
import re | ||
|
||
|
||
@pytest.mark.parametrize('dir_name', [ | ||
'bin', | ||
'libexec', | ||
'jre', | ||
]) | ||
def test_directories(host, dir_name): | ||
install_dir_pattern = '/opt/git-credential-manager/[0-9\\.]+$' | ||
install_dir = host.check_output('find %s | grep --color=never -E %s', | ||
'/opt/git-credential-manager', | ||
install_dir_pattern) | ||
dir = host.file(install_dir) | ||
assert dir.exists | ||
assert dir.is_directory | ||
assert dir.user == 'root' | ||
assert dir.group == 'root' | ||
|
||
dir = host.file(install_dir + '/' + dir_name) | ||
assert dir.exists | ||
assert dir.is_directory | ||
assert dir.user == 'root' | ||
assert dir.group == 'root' | ||
|
||
|
||
@pytest.mark.parametrize('file_path', [ | ||
'bin/git-credential-manager', | ||
'jre/bin/java', | ||
]) | ||
def test_files(host, file_path): | ||
install_dir_pattern = '/opt/git-credential-manager/[0-9\\.]+$' | ||
install_dir = host.check_output('find %s | grep --color=never -E %s', | ||
'/opt/git-credential-manager', | ||
install_dir_pattern) | ||
dir = host.file(install_dir) | ||
assert dir.exists | ||
assert dir.is_directory | ||
assert dir.user == 'root' | ||
assert dir.group == 'root' | ||
|
||
installed_file = host.file(install_dir + '/' + file_path) | ||
assert installed_file.exists | ||
assert installed_file.is_file | ||
assert installed_file.user == 'root' | ||
assert installed_file.group == 'root' | ||
|
||
|
||
def test_libexec(host): | ||
file_pattern = ('/opt/git-credential-manager/[0-9\\.]+/libexec/' | ||
'git-credential-manager-[0-9\\.]+\\.jar$') | ||
file_path = host.check_output('find %s | grep --color=never -E %s', | ||
'/opt/git-credential-manager', | ||
file_pattern) | ||
installed_file = host.file(file_path) | ||
assert installed_file.exists | ||
assert installed_file.is_file | ||
assert installed_file.user == 'root' | ||
assert installed_file.group == 'root' | ||
|
||
|
||
def test_link(host): | ||
installed_file = host.file('/usr/local/bin/git-credential-manager') | ||
assert installed_file.exists | ||
assert installed_file.is_symlink | ||
assert installed_file.user == 'root' | ||
assert installed_file.group in ['root', 'staff'] | ||
|
||
|
||
def test_version(host): | ||
version = host.check_output('git-credential-manager version') | ||
pattern = 'Git Credential Manager for Mac and Linux version [0-9\\.]' | ||
assert re.match(pattern, version) | ||
version = host.check_output('git-credential-manager-core --version') | ||
pattern = r'[0-9\.]+(\.[0-9\.]+){2}' | ||
assert re.search(pattern, version) | ||
|
||
|
||
def test_git_config(host): | ||
config = host.check_output('git config --system credential.helper') | ||
pattern = ("!'?/opt/git-credential-manager/[0-9\\.]+/jre/bin/java'?" | ||
" -Ddebug=false -Djava.net.useSystemProxies=true" | ||
" -Xshareclasses:name=git-credential-manager -Xquickstart" | ||
" -jar '?/opt/git-credential-manager/[0-9\\.]+/libexec/" | ||
"git-credential-manager-[0-9\\.]+.jar'?") | ||
assert re.match(pattern, config) | ||
assert config == '/usr/local/share/gcm-core/git-credential-manager-core' | ||
config = host.check_output( | ||
'git config --system credential.credentialStore') | ||
assert config == 'secretservice' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.