Error connecting to mac from visual studio - visual-studio

I have the right IP address although when I go to connect to my mac I get this error message:
An error occurred while generating the SSH keys. Please check that the environment is properly configured. Details: cat: /Users/cbcb/Library/Caches/Xamarin/XMA/Keys/---------------------: No such file or directory
I have tried creating a new admin user, I have remote login enabled, and when I go to the following location above the folder is blanked.

I fixed this problem by manually importing the public ssh key in MonoTouch folder into the authorized_keys on mac.
To do so :
1- Copy the content of 'id_rsa.pub' located in "%localAppData%/Xamarin/Monotouch"
2- In your MAC (assuming that it is running on a VM), go to "/Users//.ssh/Authorized_keys" Open the file, paste the key in a new line, save then close.
3- Now go back to your Visual Studio and try again, you'll be able to pair your macOS
Enjoy

Close Visual Studio
Delete C:\Users\UserName\AppData\Local\Xamarin\MonoTouch
Start Visual Studio

If you try and delete the directory:
Delete C:\Users\UserName\AppData\Local\Xamarin\MonoTouch
When you relaunch visual studio and it prompts for your Apple login info you need to use the login information for the user who is currently logged in on the Mac. If you use a different account then the current user it will fail.

Sounds like you may need to redirect that to your default .ssh key location. Mine on my Mac is ~/.ssh/known_hosts. Also blank out your SSH keys please, just for security.

Related

Cannot delete __jb_old___ file

It seems like WebStorm created a file login.component.ts___jb_old___ and I can't delete it or move it.
I've gone into settings and turned off safe write, and restarted WebStorm, but I can't delete the file, which is making me unable to run my docker container.
Doing an ls -ll prints
-rw-r----- 1 Uknown+User Unknown+User 2308 Feb 6 11:29 login.component.ts___jb_old___
All of the other files in the directory have the correct permissions and are owned by me.
I'm on Windows and I am the only user on the computer and set as Admin, I've opened an Admin command prompt and still get access denied when trying to change permissions of the file or delete the file.
When I open File Explorer to try and change it through the windows gui it tells me You do not have permission to view or edit this object's permission settings.
Any ideas on how I can delete this file?
You shoud close your webstorm app.
I delete it success but created again when i refresh directory.
I restart the PC then this problem resolved...
A working fix.
IntelliJ 2019.2.2 w/ PyCharm (Latest release)
After updating to 2019.2.2 I was having this error as well. The problem I was facing was on running webpack-dev-server.
Found the recommendation to disable 'Safe writing' - which resolved my issue.
Settings > Appearance and Behavior > System Settings.
Hope this helps!

Unknown error when trying to archive for publishing Xamarin.Forms.iOS

I am currently releasing an update for an app and i can successfully debug the project. Now when i try to archive for publishing to create the .ipa file I recieve the following error:
I have tried to delete the obj + bin folders in my iOS folder and then clean/rebuild + try again but the error still remains.
Has anyone come across this problem before? The errormessage isn't giving me much information to work with.
try to delete your current certificate in keychain and add it again.
I also faced to this same exact problem when I'm going to debug the xamarin.iOS app using Visual Studio 2015. To solve this issue, steps are as below,
Open Terminal in your Mac and type this command:
security set-key-partition-list -S apple-tool:,apple:,codesign: -s /Users /YOUR_USERNAME/Library/Keychains/login.keychain-db
Then it will prompt for your Keychain access password.
(If it repeatedly promopt that your keychain access password is incorrect, go to "Keychain Access", select and deselect the lock. Then enter your password when asked for it.
Re-enter the above command in the Terminal. Give the password.
Clean and build your project and Run it.
Now it will work definetly.

Problems using GIT w/ SSH key file under Windows

I've problems using GIT with the shell, Visual Studio Code and Visual Studio 2015 (community edition).
Earlier this year I started using GIT with eGit (under Eclipse of course) without any problems. I installed GIT on my server, created a ssh key pair and after a few tests it worked (and still works).
However, now I want to use that GIT on my server with Visual Studio Code and maybe later with Visual Studio 2015.
I got stuck on this issue: GIT trys to use my PPK and asks me for the passphrase (which is emtpy). If I enter a wrong phrase it asks again and continues only if I answer correct (simply enter key). So I think everything is OK till here. But then it asks for the user password for the git-user (the right one btw) on the server and fails. Why?
In the log of my server I can't see any entry about logging in using the key file, only the errors about trying to log in with the password (which is disabled).
If I use putty with that key file I'm able to connect to my GIT server and I also get an entry in the log file. So I'm sure that everything is OK with the server.
What am I missing? I would appreciate any help about that!
Using it with Visual Studio 2015 (I can't solve the issue that it doesn't find libssh when I try to recompile the GIT module following the well known blog entry from Bernardo Pastorelli) or saving the enter key press would be a bonus, however, I would be happy if I could use GIT with key file under Shell / Visual Studio Code at all.
OS: Windows 7 64 bit
GIT 2.10.2.windows.1
VSC: V 1.7.2
TIA!
I'll try to answer the simpler question in your Post:
I would be happy if I could use GIT with key file under Shell
Once, that is done, you can build on it.
Git for windows uses Openssh and therefore will not be able to use the putty PPK file directly.
Two ways forward
Option 1: Convert PPK file to OpenSSH format
Steps to do so:
Open your private key in PuTTYGen
Top menu “Conversions”->”Export OpenSSH key”.
Save the new OpenSSH key when prompted.
To use this new openssh key for your git server, do the following:
Open up Git Bash shell and there edit ~/.ssh/config (create ~/.ssh/ if it does not exist) and define this host:
Host AuxBurgerGitServer
Hostname whatevers-your-git-remote-is
User the-git-user
IdentityFile ~/.ssh/the-open-ssh-key-exported-before
Test this by doing a ssh -T AuxBurgerGitServer which should not show any errors.
If you go this way, you should use the HOST defined above whenever referring to any repositories on this host. Therefore, for example, to clone a repo you would do something like:
git clone ssh://AuxBurgerGitServer/some-repo-name
Option 2: Configure your GIT to use pageant
You can load your PPK file in pageant and configure GIT to use pageant for authentication.
For this, the only thing you would need is to setup an environment variable like so using:
Control Panel → System → Advanced system settings → Environment variables
(or on Windows 10: Control Panel → Search → Environment variables)
GIT_SSH=c:\Program Files\Putty\plink.exe

IntelliJ IDEA git Permission denied (publickey)

I got a strange problem with using git on IntelliJ IDEA on Windows 10.
If I want to access the remote repo on GitLab, I always get
Permission denied (publickey).
Everything I found here or via Google didn't solve the problem.
I tried:
Setting the ssh executable to Native
Converting my public key from Putty to ssh-keygen style
Removing known_hosts
I also tried to access the repo with Git Bash, it works fine like that.
Another interesting fact is that after removing known_hosts, I got "Host key verification failed". I had to use Git Bash once to recreate the known_hosts entry, after that I got the Permission denied error again. Somehow I don't get asked for any user input.
I faced this problem while connecting bitbucket cloud from my Intellij 2019.2 , which thankfully got solved with the following steps. Please note that these steps are to be carried out after you successfully generate and add ssh-public key to your bitbucket/github/gitlab profile.
Open Git-SCM ssh_config file present in Git-SCM installation directory.It's default location in Windows (for 64 bit) is in C:\Program Files\Git\etc\ssh\
Add the following lines into ssh_config
Host *your-gitlab-or-github-or-bitbucket-hostname*
IdentityFile *your-ssh-rsa-privatekey-file-with-absolute-path*
for e.g
Host bitbucket.org
IdentityFile C:/Users/Sahil/.ssh/id_rsa
Source:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/360004124959-IntelliJ-2019-1-3-Can-t-access-git-using-SSH-keys
Update IDEA 2021.2.3
The bug in Sahil's answer has been fixed and Christian's solution is not needed with the correct entry in your ssh config file for the most common case of one key for one or more hosts. Additional options for complex configurations, such as multiple keys to the same or multiple hosts, can be found in Maddes comprehensive answer on superuser.
ANY inconsistency between ssh-agent and ssh-add leads to a situation where some things work and some don't.
For example, I had the Windows OpenSSH agent running but my path pointed first to the Git for Windows ssh-add. Many such failures are possible given the many ssh implementations out there, so know that you know where things are running from.
To get ssh working in IDEA...
Git for Windows
Install Git for Windows. I put it in C:\Git since, as a standard user without an elevated install, I couldn't write to C:\Program Files.
In Control Panel | User Accounts | Change my environment variables add the Git usr\bin folder to the path after the cmd folder entry already there (e.g. C:\Git\usr\bin for my installation).
Unset environment variable HOME -- it still breaks ssh in this version of IDEA.
In a Windows cmd.exe console, run start-ssh-agent.cmd to start the agent
In IDEA in Settings | SSH Configurations | Authentication type: set it to Key pair OpenSSH or PuTTY and test your connection. Then, make a small change and test Commit and push....
Windows OpenSSH
In Control Panel | User Accounts | Change my environment variables add C:\Windows\System32\OpenSSH to your path. Make sure no other ssh implementation is ahead of this in the path!
Start the OpenSSH agent in Task Manager | Services (or any number of other ways)
Set your IDEA SSH Configuration as #5 above
Keep in mind that, on Windows, ssh in IDEA uses the environment available in a standard Windows command-line console (cmd.exe). If git operations work there, then with the above steps in place, they'll work in IntelliJ.
It has been really long since OP but here is my solution on an execution basis:
You need to open a prompt and set the ENVVAR GIT_SSH_COMMAND.
You need to open IntelliJ from that same prompt.
Example:
> set GIT_SSH_COMMAND=ssh -i C:\\path\\to\\not\\default\\key
> idea
Also the path to not-default-key should use ~ instead of %userprofile% or paths unix-like using /.
I was having this same issue, and while it did have to do with the public key, my issue was concerned with WSL2/Linux and windows .ssh folders. My keys were in my WSL2/linux folder system, but intelliJ was looking in my windows folder system.
I copied my rsa keys from WSL2 to windows, and it worked automatically. In fact, I attempted to have it fail again by removing the keys from the Windows folders, but intelliJ must have it's own keylocker solution, because even without the keys in the Windows .ssh folder intelliJ continued to work.
For a screen capture explaining it you can see it here https://vimeo.com/558267383/74d55415c4
If you're using wsl2 in Clion like me, just add
Host github.com
IdentityFile /home/yieatn/.ssh/github
to /home/user/.ssh/config (create if it doesn't exit). You don't even have to restart IDE.
Adding to Cristian Torres's answer:
For all of you folks struggling with a similar problem on Mac OSX:
In IntelliJ, PyCharm, etc. click Tools -> Create Command-line Launcher...
Open your terminal and execute:
$ export GIT_SSH_COMMAND="ssh -i ~/.ssh/your-custom-private-key"
$ idea
For PyCharm the executable name is charm or /usr/local/bin/charm
Goland: goland or /usr/local/bin/goland
WebStorm: webstorm or /usr/local/bin/webstorm

Permissions and SVN Updates on Windows Server 2008: same folder & SVN account, different Active Directory users

We're experiencing strange permission issues with SVN after switching from Windows Server 2003 to Server 2008.
On our standard build box there is a folder (C:\SVN_Code_Folder) which AD_User_A associates with a SVN repository using SVN_User and TortoiseSVN 1.7.6
When using Windows 2003, when AD_User_B logs into the box and tries to Update, Switch, Merge the SVN_Code_Folder with SVN_User, the command is executed.
It Windows 2008, it fails with the message:
Command: Update
Error: Working copy 'C:\jboss-4.2.3.GA\server\New folder' locked
Error: sqlite: attempt to write a readonly database
Error: sqlite: attempt to write a readonly database
Completed!
Attempting to unlock the file, which was never locked, via the context menu is met with the following message:
There's nothing to unlock. No file has a lock in this working copy.
I've played with the permissions of the folder and I've discovered that giving "Domain Users" control over the folder fixes the issue, but I would prefer to not have such a broad permissions. I've tried granting the same permissions to individual users and a SVN-group, but these too did not work.
What am I missing?
Is this an improper use of SVN?
Can 2 different Domain users update a folder using SVN without removing the .SVN file?
For future reference...
I had this same problem with some WC's that I copied over to my new laptop's hard drive, from a file share on my old machine.
It turned out that the problem was solved by giving myself (as opposed to all domain users, or any other group) full control over the folder.
Did you check the svn service user on the win2008 machine?
Does that user have local administrator privileges and also have permission to these folders on c:?
After changing anything restart the service.
For me change folder permissions did't help, but I have update for several directories in a batch script so I solved this by
cmd -> Run as administrator -> start update script

Resources