I am testing out the new Projects and Workers feat...
# ask-community
k
I am testing out the new Projects and Workers features. I am trying to get my worker to pull the code from bitbucket like this (see image). But I get this error:
Copy code
Cloning into 'data_infrastructure'...
error: cannot run ssh: No such file or directory
fatal: unable to fork
14:29:52.302 | ERROR   | Flow run 'therapeutic-mackerel' - Flow could not be retrieved from deployment.
Traceback (most recent call last):
It would be great if you could add more examples on how templating with blocks work and especially with access tokens.
I have a secret block with the name: 'annotation-pipeline-credentials'
a
It looks like you’re using an SSH URL for cloning, which I think doesn’t work with an access token. I think it will work if you use an HTTPS URL which should be something like this:
<https://bitbucket.org/my_company/data_infrastructure.git>
. I think you’ll also need to make sure your access token is in the format
x-token-auth:{your_token}
k
Thanks alex, you got me closer to the answer! Now I get this error:
Copy code
ValueError: Invalid template: 'x-token-auth:{{ prefect.blocks.secret.annotaion-pipeline-credentials }}'.
How should I read the token from my blocks? I also tried to configure it with a bitbucket secret's block but couldn't figure out how to reference it in the config.
a
I’d recommend keeping the format in the screenshot above:
Copy code
access_token: "{{ prefect.blocks.secret.annotaion-pipeline-credentials }}"
Block values aren’t currently able to be interpolated into a string, so the value stored in the block should be
x-token-auth:{your_token}
d
Makes sense. Thanks 👍