In Prefect 2.3 you can reference the GitHub block in a Prefect Deployment or when making a deployment from the CLI.
I don’t believe you can use it in a task. What are you trying to use it for?
Anna just released
this blog post yesterday that shows how to create the GitHub read-only storage block in code and then reference from the command line when creating a Deployment.