Replies: 2 comments 5 replies
-
Another alternative approach is to have an option with So for each repo in the script it would do something like:
|
Beta Was this translation helpful? Give feedback.
-
hello @timrogers @dylan-smith As you may see the file is successfully created (validated directly on the server). I tried using the generate-script scope but I cannot see any commands related to SFTP in it. Also checked the files permissions and all seems good. I know I can go manually but just want to know if there's any workaround to do it automated. So I'm not sure if my issue is related to this, or maybe you have another scope to check this. Any help would be really appreciated. |
Beta Was this translation helpful? Give feedback.
-
When running a migration from Bitbucket Server/Data Center, we use the Bitbucket instance's REST API to ask it to generate a migration archive.
Once that archive is generated, it is stored on the Bitbucket Server's local storage, and there is no way to access that file over HTTP(S).
In order to enable an end-to-end migration, the
gh bbs2gh
CLI can automatically connect to the Bitbucket Server using SFTP or SMB to grab the archive and continue with the migration.At the moment, for SFTP connections (which are the most common case - anecdotally, relatively few users are running Bitbucket on Windows), we are using the SSH.NET library to programatically perform SFTP operations.
There are a number of known issues with this library - or at least our implementation - which affect users.
Fortunately, there is a workaround: doing the SSH step outside of the CLI, and then passing the obtained file to the CLI to continue the next steps of thee migration.
The goal of this discussion is to document known issues and outlined potential next steps.
Known issues with SSH.NET
cipher name aes256-ctr for openssh key file is not supported
is thrown.Subsystem 'sftp' could not be executed
error, even when an SFTP operation can be performed using thesftp
binary directly.Potential next steps
sftp
operations manually: This will avoid the idiosyncracies of SSH.NET and will allow us to support a wider range of setups natively, but it will probably bring other problems, and it will be hard to support Windows where thesftp
binary is not available, most likely forcing us to support SSH.NET and shelling-out simultaneously.generate-script
which usessftp
directly in the generated script: This will allow us to offer more flexible and debuggable SFTP support, whilst not shelling out directly in the code.Beta Was this translation helpful? Give feedback.
All reactions