bitbucket

将现有源代码导入GitHub

不羁的心 提交于 2020-01-06 17:02:35
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 如何将源代码从计算机导入到GitHub帐户? #1楼 正如JB正确地指出的那样,只需遵循说明,它在GitHub上就变得异常容易。 这是登录后使用 http://github.com/new 在GitHub上建立新存储库后显示的说明示例。 Global setup: Set up Git: git config --global user.name "Name" git config --global user.email email@gmail.com Next steps: mkdir audioscripts cd audioscripts git init touch README git add README git commit -m 'first commit' git remote add origin git@github.com:ktec/audioscripts.git git push -u origin master Existing Git repository? cd existing_git_repo git remote add origin git@github.com:ktec/audioscripts.git git push -u origin master

How to trigger jenkins build upon bitbucket pull request merged

帅比萌擦擦* 提交于 2020-01-06 03:10:29
问题 I looked at all other related questions and answers, didn't find anything solid, hence I'm opening a new question to look for your kind help, I've been working on this the whole day, any help I can get would be highly appreciated. Here's my environment: self-hosted jenkins server (Jenkins ver. 1.651.3) with git and bitbucket plugin installed. https://bitbucket.org (I do not have a self-hosted bitbucket server) What I want to do: to trigger jenkins build upon pull request got merged from

Branching/Forking just portion of parent repository

筅森魡賤 提交于 2020-01-06 01:30:38
问题 We have a codebase on bitbucket which has some 'confidential' libraries. Is there a way to create branch or fork for investigation purposes (for off-site workers) that will not contain chosen confidential files, but for all other files there still will be ability to push, pull, see entire history? I've been able to achieve this in other source controls by specifying advanced mapping of files/folders between branches, but I'm not able to find similar functionality on bitbucket. EDIT1: Here is

git, oauth2 token and GIT_ASKPASS

非 Y 不嫁゛ 提交于 2020-01-05 10:05:14
问题 I'm using Bitbucket and would like to get an automatic pull/push/clone working without using my plane password. I made some progress with generating Oauth2 access tokens for that purpose. My script looks like this: consumer_key=XXXXXXXXXXXXXXXXXX consumer_secret=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX oauth2_return_str=$(curl -X POST https://bitbucket.org/site/oauth2/access_token -u "${consumer_key}:${consumer_secret}" -d grant_type=client_credentials 2>/dev/null) oauth2_token=$(echo $oauth2_return

Prevent users to commit on develop/master

六眼飞鱼酱① 提交于 2020-01-05 07:10:37
问题 We have a bitbucket server, we have introduced the usage of Pull Requests to protect two branches: Master and Develop. This works well and people cannot push anymore to those branch on our bitbucket server. But the issue is that sometimes when we took the develop version to test some behavior, we forget to change the branch for doing our modification, and we do some commit locally that we cannot push to the server. My question is: Is there a way to prevent users from committing on those two

Cannot clone repositories (returns empty folder)

一个人想着一个人 提交于 2020-01-05 04:58:11
问题 Bitbucket self-hosted server. We have repositories that we could clone in the past. Now what happens is: clone fetches data, and at the end I have just an empty folder, not even a .git/ folder, just nothing. Tried with 4 different accounts, one of which is administrator. Tried on Windows 10 and Mac OS. Tried on different repositories and projects. Tried from command line and from Sourcetree. I can clone from other servers. I can do a combo of git init / git remote add / git fetch etc. and

npm command is not found when ssh with bitbucket pipelines on shared hosting

白昼怎懂夜的黑 提交于 2020-01-05 04:56:09
问题 I've installed nodejs as described here. Everything works fine when I ssh to the server myself. But I've created a script that deploys my application and call it via bitbucket pipelines. Everything else works fine ( composer install , php artisan migrate etc.), except npm install . The error message is ./deploy: line 26: npm: command not found In bitbucket-pipelines.yml I call my script like this: - step: script: - ssh user@ip_address ./deploy When I call the script by myself everything works

Git Rebase or Squash?

你说的曾经没有我的故事 提交于 2020-01-05 04:07:09
问题 I have created a feature branch from develop and that feature branch contains bunch of commits for approximately 20. Before merging the feature branch to the develop I want to convert all commits into one. Which one is the best way to accomplish this task git squash or rebase and how to do it? 回答1: If you want to squash your bunch of commits into a single commit on feature branch you can do it as follows, but if this bunch of commits is already pushed to remote you have to be sure that no one

Git Rebase or Squash?

余生长醉 提交于 2020-01-05 04:07:05
问题 I have created a feature branch from develop and that feature branch contains bunch of commits for approximately 20. Before merging the feature branch to the develop I want to convert all commits into one. Which one is the best way to accomplish this task git squash or rebase and how to do it? 回答1: If you want to squash your bunch of commits into a single commit on feature branch you can do it as follows, but if this bunch of commits is already pushed to remote you have to be sure that no one

Bitbucket Webhooks

眉间皱痕 提交于 2020-01-04 18:15:31
问题 I want to automate the deployment of one of my projects onto my server. I m using git via bitbucket to version control my software. I came accross this this nice tutorial. Unfortunately i cannot get it to work. If i push changes from my local working copy, the remote repo gets updated but the webhook gives me the 404 error. So communication with my server was established but the script was not found. When i manually start the script via php bitbucket-hook.php a pull request is issued on the