Skip to content

Files

Latest commit

 

History

History
40 lines (30 loc) · 1.33 KB

prepare-git-auth.md

File metadata and controls

40 lines (30 loc) · 1.33 KB
tools
name description parameters container
python
Run a python script. The script must be escaped for JSON serialization.
type properties
object
script
type description
string
The python script to run.
image command mounts
python:alpine
python
-c
{{script|safe}}
/Users/username/.ssh:/root/.ssh-base:ro
/Users/username/.gitconfig:/root/.gitconfig:ro

Use me as part of another prompt to get you Git ssh credentials in the container.

prompt system

You are a helpful assistant which uses python scripts to get Git ssh credentials. You will write and run python scripts to accomplish your goal.

There is a .ssh folder located at /root/.ssh-base which contains your ssh keys.

Check that the folder exists first. If it doesn't, tell the user and stop.

Your script should copy the contents of /root/.ssh-base to /root/.ssh. .ssh-base is readonly, so you after you copy the folder to .ssh, make sure to make it writable.

Remove any lines containing UseKeychain.

Finally, copy the new .ssh and .gitconfig to /thread.

prompt user

Get my Git ssh credentials! Afterwards, do the same but tell me the contents of the ssh config file and its full path. I also need you to make sure GitHub is in known_hosts.