0
0
Gitdevops~20 mins

Credential storage options in Git - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Git Credential Storage Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding Git Credential Storage Types

Which Git credential storage option stores your credentials only in memory for a limited time?

Agit-credential-plain
Bgit-credential-store
Cgit-credential-manager
Dgit-credential-cache
Attempts:
2 left
💡 Hint

Think about a storage that forgets your password after some minutes.

💻 Command Output
intermediate
1:30remaining
Output of Git Credential Store Command

What is the output of the following command if the credential store file does not exist yet?

git config --global credential.helper store
cat ~/.git-credentials
ANo output, the file ~/.git-credentials is created empty.
BError: file not found ~/.git-credentials
COutputs stored credentials in plain text
DOutputs encrypted credentials
Attempts:
2 left
💡 Hint

Check what happens when you enable store but have not saved any credentials yet.

Troubleshoot
advanced
2:00remaining
Troubleshooting Git Credential Manager on Linux

You installed Git Credential Manager on Linux but Git still prompts for username and password every time. Which is the most likely cause?

AGit Credential Manager is not configured as the credential helper.
BThe ~/.git-credentials file is corrupted.
CGit Credential Manager only works on Windows.
DThe credential cache timeout is set to zero.
Attempts:
2 left
💡 Hint

Check if Git knows to use the credential manager.

🔀 Workflow
advanced
1:30remaining
Configuring Git to Use Credential Cache for 10 Minutes

Which command correctly sets Git to cache credentials in memory for 10 minutes?

Agit config --global credential.helper 'store --timeout=600'
Bgit config --global credential.helper 'cache --timeout=600'
Cgit config --global credential.helper 'cache --timeout=60'
Dgit config --global credential.helper 'manager --timeout=600'
Attempts:
2 left
💡 Hint

Remember the cache helper uses seconds for timeout.

Best Practice
expert
2:30remaining
Choosing Secure Git Credential Storage for a Shared Workstation

You work on a shared workstation and want to store Git credentials securely without saving them in plain text files. Which credential helper is the best choice?

Agit-credential-cache
Bgit-credential-store
Cgit-credential-manager-core
DNo credential helper, enter credentials every time
Attempts:
2 left
💡 Hint

Consider helpers that integrate with OS secure storage.