Forge options list

Hello,

I saw an example in forge install, there are some options like -p (product) -e (env) and -s (site). But what are the options for forge create or others? Does forge support proxy? We are behind coorporate proxy and could even not login. Is forge/cli a closed source project? Not able @ github or bucket?

Hi @YongZheng,

The Forge CLI does make requests to an Atlassian server, and does attempt to store your own API key on your computer. If your company enforces restrictions that do not allow these functions, the Forge CLI may not be able to work correctly.

For the requests to the server, you can set a proxy by using the shell environment variable FORGE_GRAPHQL_GATEWAY, which defaults to https://api.atlassian.com/graphql within the CLI. If you require, you may be able to set up a proxy which passes the requests through the proxy to the default URL.

Currently, the CLI is indeed a closed source project. Are there particular reasons you would like to see it open sourced? It would be helpful for us to know this, so we are able to appropriately prioritise making that happen.

1 Like

@kchan, first of all thanks you for your answer.

If the cli would be open source project. Even if it would be just read-only mode would help many developer better understanding cli and solve many trouble ourselves. They would need much less support of atlassian and it’s also an advantage of yours.

Can you provide me a list of available options for cli?

for example. forge install -p confluence -e development -s abc.atlassian.net
these options -p, -e, -s are now known. But whats for forge create, forge registry and etc.

I am back. I did it as suggested. Unfortunelly setting FORGE_GRAPHQL_GATEWAY only replace GraphQL Gateway to http://proxy.xxxx.xxxx:3128 does not help me to login with forge.

Hi @YongZheng,

Thanks for the suggestion and info! I’ll pass it on to my team and we’ll keep it in consideration.

To find the list of available options for each command, you can use the --help option. For example, forge create --help will give you the list of available options for the forge create command. You can also run forge --help to see all the commands available.

Regarding the proxy, are you sure that the proxy you are using sends the request through to the graphql URL? If you run FORGE_GRAPHQL_GATEWAY='https://proxy.xxxx.xxxx:3128 forge login --verbose', are you able to send me the resulting URL that appears after ▶️ GraphQL? (You can redact any sensitive/identifying parts, I just want to check that it is being overwritten correctly and also that it contains the original URL in the query string or similar)

Hi @kchan,

I met same issue with @YongZheng , GraphQL Gateway is blocked by our corporate network by default, but I can access it with a web proxy. Is there a way to configure a web proxy for forge development toolkit?

I tried to add https_proxy, http_proxy, proxy for node, but it seems it doesn’t work.
The error looks like below:
request to GraphQL Gateway failed, reason: Client network socket disconnected before secure TLS connection was established

Thanks,
Mike

Hey @MikeHe,

Are you able to try using the FORGE_GRAPHQL_GATEWAY environment variable?

By default, if the variable is not defined, the CLI will use https://api.atlassian.com/graphql, but given that this is blocked by your corporate network, you may need to set the variable to a URL that proxies to https://api.atlassian.com/graphql instead?

1 Like

Can you send me command to set it? I cannot found command to set FORGE_GRAPHQL_GATEWAY.

Hi @TYB1HC,

It must be set as an environment variable. I.e. in a Unix environment, this will be:

FORGE_GRAPHQL_GATEWAY="https://example.com" forge deploy

You can use

export FORGE_GRAPHQL_GATEWAY="https://example.com"

to set the environment variable for all forge commands that run after that within the same terminal session.

i.e. after running that once, you can just run forge deploy and it will use that value.

If you’re not familiar with environment variables, you might find this page I just found helpful: Environment Variables for Java Applications - PATH, CLASSPATH, JAVA_HOME