`forc build` is not working on windows wsl

forc build command is failing on windows wsl with the following error message:

error: failed to fetch `https://github.com/fuellabs/sway`. Check your connection or run in `--offline` mode

fuelup show result:

Default host: x86_64-unknown-linux-gnu
fuelup home: /home/USER/.fuelup

Installed toolchains
--------------------
latest-x86_64-unknown-linux-gnu (default)

active toolchain
----------------
latest-x86_64-unknown-linux-gnu (default)
  forc : 0.63.5
    - forc-client
      - forc-deploy : 0.63.5
      - forc-run : 0.63.5
    - forc-crypto : 0.63.5
    - forc-debug : 0.63.5
    - forc-doc : 0.63.5
    - forc-fmt : 0.63.5
    - forc-lsp : 0.63.5
    - forc-tx : 0.63.5
    - forc-wallet : 0.9.0
  fuel-core : 0.35.0
  fuel-core-keygen : 0.35.0

fuels versions
--------------
forc : 0.66.4
forc-wallet : 0.66.0

Hey @Adg0, can you try looking at this forum post with a similar issue and can you try this solution as it worked for them. Please lmk if the error still persists. Thanks

Thanks @Nazeeh21 , I tried the solution from the post but it didn’t solve the problem. Using ssh with the Rust SDK to fetch the github repo solved my issue.

cargo generate --git git@github.com:FuelLabs/sway.git --branch master --init templates/sway-test-rs --name counter --force

after running the command above forc build works and compiles my contract.

1 Like

Glad to hear it worked.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.