Showing posts with label source control. Show all posts
Showing posts with label source control. Show all posts

Install SSH BitBucket + SourceTree

0

Category :

Follow the tutorial provided by Atlassian/BitBucket

Set up SSH for Git
https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html


I encountered 2 issues:

1)
The authenticity of host 
'bitbucket.org (131.103.20.167)' can't be established.
RSA key fingerprint is 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40.
Are you sure you want to continue connecting (yes/no)?

Fix

I used the answer i found in the following question
https://answers.atlassian.com/questions/331668/how-to-rectify-ssh-error-authenticity-of-host-cant-be-established

Which basically was:
"This is actually normal. It’s not actually an SSH error. What’s happening is that SSH is being cautious. That’s part of being secure. Whenever SSH tries to log in to a host it hasn’t seen before, it will put up a message like this.
SSH is saying “I haven’t seen this host before. It has this IP. It identifies itself with this fingerprint. Do you really want to connect?”

In this particular case, you don’t have any other fingerprint to compare it to. But you really are trying to connect to bitbucket.org. So you can go ahead and say “yes” and you should continue logging in."

2)
"Authentication via SSH keys failed, do you want to launch 
the SSH key agent and retry?"

When i got to the final step to commit my test commit, I got the above error from SourceTree

I was able to complete a push to BitBucket using GitBash with no error, which to me suggested it as solely a SourceTree issue..

When i tried to use the suggested "Putty Authentication Agent" it was looking for a .ppk file which i had not generated as part of the suggested process so i presume it was looking for this type of file due to the SSH Client setting.

Fix

To fix the issue i went to
SourceTree-->Tools-->Options
and within the
SSH Configuration. section i changed the
SSH Client to OpenSSH, which solved the issue.
SourceTree actually located the appropriate file itself which i just confirmed.

Gits Bits - Stuff to remember

0

Category : ,

Conflict between Develop and new feature branches

When creating a Pull Request and there is a Conflict between your branch and the Branch you're trying to merge into ie My_Branch into Develop and you get a conflict with the gitignore.
  1. Pull develop branch locally
  2. Switch back to your branch
  3. Right click on your Develop and "Merge Develop into current Branch"
  4. This will display conflicts locally, so you can fix them.
  5. Right click on conflicted file and "Resolve conflicts using External tool"
  6. Resolve conflicts
  7. Commit Merge locally.
  8. I Merged on the web aswell to complete Pull Request

Copy repo into another repo(all commits)

  1. Clone Destination repo(make a copy, don’t use your already existing one) eg reponame.Test
  2. Delete the link to the original repository to avoid accidentally making any remote changes
    git remote rm origin
  3. create new branch on destination repo
  4. Create a remote connection to sourceRepo as a branch in destRepo.
    git remote add /url/to/sourceRepo
  5. Pull from the sourceRepo branch
    git pull --allow-unrelated-histories /url/to/sourceRepo branchname-in-sourceRepo
  6. Address any conflicts and merge

my thanks to:
https://blog.mattsch.com/2015/06/19/move-directory-from-one-repository-to-another-preserving-history/
http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/