common-fate / granted

The easiest way to access your cloud.
https://granted.dev
MIT License
956 stars 90 forks source link

Getting "invalid cross-device link" on registry sync (linux) #600

Closed sirianni closed 1 month ago

sirianni commented 5 months ago

On linux, granted registry sync fails:

$ granted registry sync
[i] From github.com:my_company/granted-registry
[i]  * branch            HEAD       -> FETCH_HEAD
[✔] Successfully synced registry my_company
[✘] rename /tmp/granted-registry-sync431384928/aws-config /home/sirianni/.aws/config: invalid cross-device link

Since /tmp is mounted from tmpfs the error message seems legitimate.

sirianni commented 5 months ago

@sosheskaz Seems related to https://github.com/common-fate/granted/pull/569 which uses os.Rename() to move the tmp config file onto ~/.aws/config.

sirianni commented 5 months ago

I can confirm that downgrading to 0.20.3 fixes the issue.

christian-at-sevenlab commented 4 months ago

Same issue here. Downgrading to 0.20.3 also fixes the issue

sirianni commented 1 month ago

If it's not possible to fix the issue can you advise how to locally build granted in a way that works with the standard config locations. I'm having a very hard time with dgranted and all of the

// these URLs are overridden as part of the release build process.

I can't find anything in this repo that actually overrides those so it seems that the release build scripts are located somewhere else.

sirianni commented 1 month ago

This may have been fixed with the switch to gopkg.in/ini.v1

chrnorm commented 1 month ago

This should be fixed in #622, as we no longer write a temporary file. Is the issue still present in the latest release?

Sounds like we need to improve the docs on building from source too, thanks for flagging this @sirianni

sirianni commented 1 month ago

Yes it seems to work in the latest version.

chrnorm commented 1 month ago

Great - I’ve raised #656 to track the docs improvements.