bitbucket

Download private BitBucket repository zip file using http authentication

霸气de小男生 提交于 2019-11-26 19:09:29
问题 I'm writing a script to easily deploy an application. The code for the application is stored in a private BitBucket repository. I'd like to be able to download a zip file of the commit. I've tried authenticating with the following code: https://user:pass@bitbucket.org/user/repo/get/commit.zip However, instead of accomplishing the task it redirects to the login page on BitBucket. 回答1: Personally, I didn't want to put my password into my script to accomplish this. So the trick was to run the

BitBucket: Host key authentication failed

試著忘記壹切 提交于 2019-11-26 18:18:29
问题 I want to clone a remote repository to my local machine. I used the command: git clone git@bitbucket.org:<username>/<repo_name>.git and I got the message: The authenticity of host 'bitbucket.org (104.192.143.3)' can't be established. RSA key fingerprint is SHA256:****. Are you sure you want to continue connecting (yes/no)? Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. I just want to

Start ssh-agent on login

瘦欲@ 提交于 2019-11-26 17:29:17
问题 I have a site as a remote Git repo pulling from Bitbucket.com using an SSH alias. I can manually start the ssh-agent on my server but I have to do this every time I login via SSH. I manually start the ssh-agent: eval ssh-agent $SHELL Then I add the agent: ssh-add ~/.ssh/bitbucket_id Then it shows up when I do: ssh-add -l And I'm good to go. Is there any way to automate this process so I don't have to do it every time I login? The server is running RedHat 6.2 (Santiago). 回答1: Please go through

How to avoid merge-commit hell on GitHub/BitBucket

早过忘川 提交于 2019-11-26 15:00:37
问题 We're ending up with a lot of commits like this in our repo: Merge branch 'master' of bitbucket.org:user/repo This happens every time a developer syncs his/hers local fork to the top-level repo. Is there anyway to avoid this merge-commit hell from cluttering all the repo log? Can one avoid them when initiating the pull-requests in some way? I know I can do git rebase if this is done in my local VM only, is there any equivalence in the GitHub/BitBucket UI? How do you guys do it? 回答1: Rebase

How to move git repository with all branches from bitbucket to github?

你说的曾经没有我的故事 提交于 2019-11-26 14:57:33
问题 What is the best way to move a git repository with all branches and full history from bitbucket to github? Is there a script or a list of commands I have to use? 回答1: You can refer to the GitHub page "Duplicating a repository" It uses: git clone --mirror: to clone every references (commits, tags, branches) git push --mirror: to push everything That would give: git clone --mirror https://bitbucket.org/exampleuser/repository-to-mirror.git # Make a bare mirrored clone of the repository cd

How to restrict access to master branch on git

烂漫一生 提交于 2019-11-26 12:54:44
问题 I have a single repo in which I have 2 user groups: Admins HTML/UI Developers I do not wish to give read/write access of my master branch to my HTML developers as they do not need to work on it and should not be misusing the core code. Though they need to work on their own branch ui-developers . How do I do this on git? P.S.: I am using BitBucket UPDATE: I had posted this question when I was extremely new to coding and git. After 2 years of experience, I now know that git doesn\'t allow to

How to remove a directory from git repository?

廉价感情. 提交于 2019-11-26 10:55:57
I have 2 directories on my GitHub repository. I'd like to delete one of them. How could I do that without deleting and re-creating entire repository? karmakaze Remove directory from git and local You could checkout 'master' with both directories; git rm -r one-of-the-directories git commit -m "Remove duplicated directory" git push origin <your-git-branch> (typically 'master', but not always) Remove directory from git but NOT local As mentioned in the comments, what you usually want to do is remove this directory from git but not delete it entirely from the filesystem (local) In that case use:

Cannot push to Git repository on Bitbucket

北战南征 提交于 2019-11-26 10:05:52
问题 I created a new repository and I\'m running into a strange error. I\'ve used Git before on Bitbucket but I just reformatted and now I can\'t seem to get Git to work. After doing a commit, I had to add my email and name to the globals, but then it committed just fine. When I try to use the command git push origin master it doesn\'t work. I get this message: $ git push origin master Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the

difference between origin/branch_name and branch_name?

巧了我就是萌 提交于 2019-11-26 09:29:04
问题 for pushing to bitbucket. If I do: git push origin origin/branch_name my commits are not pushed. Total 0 (delta 0), reused 0 (delta 0) If I do git push origin branch_name my commits are pushed: Counting objects: 160, done. Delta compression using up to 8 threads. Compressing objects: 100% (13/13), done. Writing objects: 100% (20/20), 2.10 KiB | 0 bytes/s, done. Total 20 (delta 6), reused 0 (delta 0) so what is the origin/ mean in front of the branch_name? And why does it matter? 回答1: You have

Best practice - Git + Build automation - Keeping configs separate

一笑奈何 提交于 2019-11-26 08:45:42
Searching for the best approach to keep my config files separate, yet not introduce extra steps for new developers setting up their environments. I am guessing a submodule would suffice to do the job, but then how would I switch configs seamlessly depending on the task at hand, aka pull in DEV config regularly, pull PROD branch of config repo during build? Needs to be: Easy and painless for new devs. PROD config files should only be accessible to select users + build user. Thank you in advance. VonC That is called content filter driver , and it allows you to declare, in a .gitattributes file