Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Is there a way to trigger the GitHub Git: Clone action on initial startup? #3549

Answered by jsjoeio
binduwavell asked this question in Q&A
Discussion options

I'm using the docker container. The startup script does a git clone... However, I have a private repo so that doesn't work unless I create some .ssh certs and load them into the container... Which is OK but them I'm storying those creds in my registry... Since VSCode/code-server has the git: clone feature, I was wondering if there is some sort of startup script where I could cause code-server to trigger this action, ideally with a preconfigured github project and local path?

You must be logged in to vote

🤔 I'm not sure if that's possible. @bpmct or @code-asher might know though

Replies: 1 comment 1 reply

Comment options

🤔 I'm not sure if that's possible. @bpmct or @code-asher might know though

You must be logged in to vote
1 reply
Comment options

bpmct Jun 8, 2021
Maintainer

This can be done with tasks and the AutoLaunch extension, someone just pointed this out to me the other day:

Task:

 {
 "label": "clone",
 "type": "shell",
 "command": "cd /home/coder/project && git clone $GIT_REPO .",
 "group": "build",
 "presentation": {
 "reveal": "always"
 },
 "problemMatcher": [],
 "options": {
 "statusbar": {
 "label": "$(clone) Clone"
 }
 }
 }
Answer selected by jsjoeio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /