Import from UI
Sign In to VCS private server
Create new project or new repository
Select project importer
Select bitbucket server/github server etc.
you can choose to import specific repository OR it also allows to import all the projects/repositories
Import via commands
Clone the repository/project to retrieve all branches and tags in your local git from bitbucket cloud / any other server. Example: git clone https://....
Add bitbucket private server / gitlab server remote. Example : git remote add privatebitbucket https/ssh url
.
Pull the code to private bitbucket server. Example : git push privatebitbucket master/ tags
.
NOTE : Make sure that both the server should have the right permissions granted.
Use the code from private repository in yours website/project
Add the username and password in auth.json file, when you are installing the packages via composer.
Use this link to access/authenticate privately hosted packages or repository : https://getcomposer.org/doc/articles/authentication-for-private-packages.md
However, Composer will look like this.
{
"repositories": [
{ "type": "vcs", "url": "https://bitbucket.com/mycompany/privaterepo" },
{ "type": "vcs", "url": "http://svn.example.org/private/repo" },
{ "type": "vcs", "url": "https://github.com/mycompany/privaterepo2" }
],
"require": {
"company/package": "*",
"company/package2": "*",
"company/package3": "2.0.0"
}
}
Happy Coding 🙂