Skip to content
Skip to Content
Coder Docs

Get workspace agent Git SSH key

GET
/api/v2/workspaceagents/me/gitsshkey

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Response Body

OK

application/json
  1. response
private_key?string
public_key?string

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X GET \	"$CODER_URL/api/v2/workspaceagents/me/gitsshkey" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN"
Example Response200
{  "private_key": "string",  "public_key": "string"}