Login in screen pops up in sourcetree - bitbucket

My desktop was previously used by the previous employee at my office. In source tree I have my account logged in but my at random times the previous users login screen pops up with username field disabled
and it comes two times,when I click cancel the second screen pops up. I am fed up with this problem. I have done with everything to try and solve this problem but it will just not go.

Quite often this occurs because either a repo has multiple remotes, or a repo has a remote that you've not got permissions to anymore is still bookmarked (even if the tab isn't open in SourceTree).
For example I had 3 repos from a previous contract that I no longer had access too, whilst I didn't have the repos open in tabs within SourceTree, the repo was bookmarked so SourceTree kept trying to authenticate it; removing the bookmarks and then restarting SourceTree fixed the problem.
Removing old/non accessible repositories
In the latest version of Source Tree (2.1.2.5 at the time of writing), Select the New Tab + button, under Local repositories -> All Repos ensure that all the Repos are ones you have access to (might have to check each one can do a fetch)
Delete any bookmarks you do not need/have access to
Restart Source Tree
Removing old/duplicate/excessive remotes
Select your repository tab
Go to the Repository menu and select Repository settings (Ctrl+Shift+,)
Under the "Remotes" table, ensure the remotes are correct (most likely just origin pointing to bitbucket)
Good luck.

Related

Leave a repository on bitbucket

Last year, I was working with some other people on a computer science project. So, I created a bitbucket repository and invited everybody. As we know each other very well, everybody is an administrator of the repository and I'm the owner.
Today, I would like to clean up my bitbucket repository list. But, I can't find how to leave a repository. When I go in the settings menu, the only thing that I can do is "deleting a repository". It's not what I want to do because I want to leave the repository for the other people.
For some repository (when I'm not the owner), I can revoke myself, but for the other, I can't. Do you know how can I do that? I would like to find a solution without needing to make a ownership transfer as it involves making a transfer request and then, waiting some time to get the answer.
Thank you
Go to 'Your profile and Settings' left bottom corner & Tap 'All work spaces'
Tap 'Leave'
I would like to find a solution without needing to make a ownership transfer as it involves making a transfer request and then, waiting some time to get the answer.
Somebody must own the repository, and you can't leave a repository that you own.
You could create a team and transfer the repository there, then invite the other users to the team. Transferring your repo to a team you create should be instantaneous.
Or you can transfer the repository to an existing user and wait for them to respond, as you have suggested.
Workaround:
Disable "New source browser experience" in here: https://bitbucket.org/account/user//features/
Then click "revoke" in here: https://bitbucket.org///overview

Not push Sourcetree/Bitbucket

I am new to Bitbucket/Sourcetree. After clone the repository to my local machine. I made one one comment to test it. Say it was:
just add commit
Then I clicked commit button. After that I didn't want to push it as it just was an practice. I prehaps clicked Discard(not recall clearly). Now it shows Revert "just test commit"
My question is that I really don't want to push it, how to get rid of it as the "Push" button shows "2" on it. See the image.
I tried the command git stash but it was not working.
It is tracking history. So if you pushed the 2 "changes", it would just show that you made a change, and then reverted it back.
There is an option in Git called "stash" which basically puts aside the local changes. You can do that, then just delete the stash. In SourceTree you can find the stash option under the "Repository" menu (at least on OSX).
If all you want to do is "reset" your local repo/branch to match the remote, this thread is a really good discussion about how to do that: Various ways to remove local Git changes

Cannot set artifactory repository on Jenkins

I followed Empower Jenkins with Artifactory video on YouTube. Basically, I added a new user to artifactory and granted it deploy permissions. Then I configured system configuration on Jenkins and tested that the configurations were right.
I created a new job and tried to set the deployment task to deploy it to artifactory. The problem is there is no repository on the dropdown.
I want to know how to fix this.
Try saving the job and reloading it.
The logic behind this behavior is to avoid a long list of repositories. Some users have hundreds of local repositories which takes a long time to display. By entering credentials, you can display a filtered list containing only relevant repositories.
There is an open issue to add a refresh button so there will be no need to save the job prior to displaying the list.
Update
This issue was resolved with the release of version 2.2.3 of the plugin. For more info see HAP-483

How to work with two different BitBucket accounts in SourceTree

I have two different bitbucket accounts set up. One is for work projects and one is for personal use. In BitBucket I have set up a repository in each of the accounts for different projects.
In SourceTree I have a few existing personal projects that are syncing up to my personal repository on SourceTree. In the left hand panel I can see my "Develop" branch for one of those personal projects and on the remote in BitBucket I can see the remote repo.
In SourceTree I don't see an obvious way to keep my two accounts separate. For example, I have added the work repo in SourceTree but when I try to commit an initial version of a work project it only gives me the option to commit my personal project branch.
How can I now add my work repo locally and sync only those work projects into repos on that work BitBucket account?
For SourceTree 2.0.2+ on Mac only with GitHub accounts:
Click from menu File-> New/Clone
In the dialog click settings icon.
In the resulting popup menu click Settings
It brings a dialog with listing user accounts. Add your additional account to the list.
Close the dialog.
Click remote button (next to local) on the tool in image shown below.
All your added accounts will be listed and their respective repositories with button to clone.
Hope this helps.
NOW on Windows, you do it in the Clone/Add/Create Repository dialog:
Click the "Hosted Repositories" button (internet icon)
Click "Edit Accounts"
Click "Add"
Well I have done this way:
Click on Settings
Click on Advance tab
Enter your Full name and Email address (Email should be match with your Bitbucket account)
Click on OK
Click on Close (To close current window)
Restart again
Note: You must have added account in Source tree. (Open Source tree -> Click on Setting icon < Right Top corner> -> Click Settings -> Add your Account -> Set as Default account)
Hope this would help you.
In Windows, you can do it by following steps:
Click on settings button ( right top corner). It will open dialog box.
Click on Advanced tab.
Uncheck the "Use global user settings".
Now you can enter username and email id for corresponding repository.
Click on OK to save changes.
If I understand your question correctly, you still need to do a little bit more set of your bitBucket accounts.
You can also test the BitBucket server to see which account you are logging in with.
ssh -v git#bitbucket.org
This link help me, follow these instructions here and you should be successful.
The key part you need is in you .git/config.
You'll need separate entries for each.
Use different SSH keys for different accounts on the same Git hosting
In Windows you may have more than one account (you can have even GitHub and BitBucket side by side). For example, assuming the account you have now in SourceTree is with BitBucket and you want to add your GitHub account to it as well, do the following:
From menu, choose File->New/Clone
In the Source Path/URL put the repository url for a repository you have on github
Wait for a few seconds and it asks you for username/password. (first, buttons might be disabled for example for entering your password. So wait for a few seconds first)
Add the new username and passowrd on github.
Now if you like you can cancel the clone.
For BitBucket account/repos, you can include the username you want to use as part of the git URL. SourceTree will then ask for the password for that username.
https://username#bitbucket.org/account/repo
If you've already cloned a repository with ssh on the Mac version, and you want to change the account for it, you can do this by changing the host name of the remote.
If you've let SourceTree modify your ˜/.ssh/config , then it will have added some entries starting with:
# --- Sourcetree Generated ---
Host <account name>-<service name>
...
Choose the <account name>-<service name> combination that you want to use and modify the path of your repository (in Remote Settings). Your new path will be something like the following format:
git#<account name>-<service name>:<account name>/<repository name>.git
(Actually, you can use this solution for working copies not cloned by SourceTree too.)
on windows the tool has a bug
no matter what I've tried from within the tool it was always using a previews git account which was cached somewhere...
so I searched all files where sourcetree was installed and I found a file C:\Users\WIDNOWS_USER\AppData\Local\Atlassian\SourceTree\userhosts
there I had cached the old git user/account name and it was driving me nuts in the app.
I updated this file, deleted the old account name and added the new one, restarted the tool and it started to work fine.
there's also a file
C:\Users\WIDNOWS_USER\AppData\Local\Atlassian\SourceTree\passwd
check that one too and if your cached account with passwd is there too clean it out, do not add here anything, the app will do it first time when you enter your password for the new acccount

How to remove a user from Jenkins

I have many users in Jenkins that have automatically come from SVN. One of our developers left the project and I removed him from the SVN. However, his contacts are not removed from Jenkins and I cannot find a place in Jenkins where I could remove users from. Any ideas on how to remove users from Jenkins?
I couldn't find the delete option. I went here and found a relevant but unhelpful answer. So I just tried:
http://<jenkins.url>/user/<username>/delete
I got redirected to an existing page \o/ There was a button asking to confirm the deletion. I clicked and the user was removed.
Hope this helps
PS: I just found how to do it right: Go to "Manage Jenkins" > "Manage Users" and click the delete button on the same row (far right) of the user you want to delete
I believe you need to remove or replace the user from, all the times they exist, in the build.xml file(s) which are under the jobs directory then the name of the job and the builds directory.
If you go to the People view, you can click a user and then choose Delete in the left-hand menu (if you have Administer access).
You could also delete the folder [jenkins-root]/Users/[username] and re-start Jenkins.

Resources